Releases: schveiguy/jsoniopipe
Fix static array serialization
Sigh, another stupid bug
Make sure we skip the object end on skipping an item (this happened before, but the API is slightly different)
Fix some bugs with serialization of JSONValue
Never been tested (oops)
Add `ignoreExtras` UDA to serialization
I needed to read a json stream into a type that only had some of the items. But I didn't want to serialize the rest into a JSONValue extras, which is super-wasteful. So this update allows serializing just the members desired by ignoring the extras.
Wait, json allows just serializing values???!
For some reason, somewhere in the past, I thought a valid JSON form must always be enclosed in an array or an object. But... that was wrong. It can be any value.
Also, this adds AA support for the serializer. Keys can be strings or things that parse/serialize strings.
Properly serialize/deserialize null class members
Will now serialize null class or interface members to "null"
Will now deserialize "null" to null class. Interfaces can't have a default ctor, so they have to define a fromJSON.
Bugfix for fromJSON
if you deserialize a struct with a fromJSON static method, then it would fail to save the item.
JSON5 support
JSON5 support is now available!
This release also allows processing whtiespace and comments, or skipping those. See the new ParseConfig
type for details.
Still needs updated docs.
JSON5 serialization (serializing to JSON5 stream) isn't implemented. deserialization works, as long as you pass a JsonTokenizer with JSON5 support.
Note that due to the more complex format, JSON5 parsing can be slower. However, the speed of the JSON parser should not be affected.
Fix issue with enum serialization
Serializing an enum that is integer based failed because it matched both integer serialization and enum serialization.
v0.1.2: Fix parsing of enums. Add enumBaseType UDA and alternateName UDA. Fix
Fixes issue with parseTo, and also makes enum serialization more specific with UDAs.