google / serde_json5

Apache License 2.0
12 stars 9 forks source link

Fix deserialization of unit variants #8

Closed erickt closed 3 months ago

erickt commented 3 months ago

serde_json allows for deserializing a unit variant like:

enum SomeEnum {
    SomeVariant
}

from either a string like "SomeVariant" or {"SomeVariant: null}. Previously serde_json5 would allow for any value in the second case. That data would then be thrown away. This changes serde_json5 to match serde_json and only allow null.

Note that this is a breaking change, and so it bumps the version.

woody77 commented 3 months ago

Closes #10

woody77 commented 3 months ago

This is going to merge-conflict with #6, right?

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 8788711153

Details


Totals Coverage Status
Change from base Build 8759649977: 0.3%
Covered Lines: 622
Relevant Lines: 679

💛 - Coveralls