All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Encode null classes as JSON "null".
- Decode JSON "null" to null classes.
text.json.Decode
: Only check for object null once we actually try to directly recurse into it. Allows null objects to be encoded with an encode function.
- Fix: check that isCallable can be instantiated before trying to instantiate it. Clarifies a compile error in JSON decoders.
- Allow decoding immutable
ParserMarker
.
- Avoid combinatorial explosion if decoder fails to instantiate in deep recursion.
- XML: Decode arrays of SumTypes.
- text.json.Encode: create fast path for
SysTime
. (This type is very common.)
- Add
text.json.ParserMarker
, a type that can be thrown into a decoded struct to match any JSON value. As opposed toJSONValue
,ParserMarker
just skips the region in the input stream without parsing. Later on, you can callmarker.decode!(T, handler)
to resume parsing inside the marker. Note that while faster than parsing, skipping in the input stream is not free! The JSON will still need to be lexed. Only useParserMarker
if there is no way to know the full type of the message at the time.
- Avoid combinatorial explosion if decoder fails to instantiate in deep recursion.
- Work around DMD 2.097.2 issue where a
FindChildrenRange
related symbol would not be found.
- Allow decoding a struct member that is a struct with an immutable hashmap aliased to
this
.
- Allow decoding a struct member that is an immutable hashmap.
- Work around DMD 2.097.0 regression https://issues.dlang.org/show_bug.cgi?id=22214 .
- Update dub boilerplate requirement. Commit dub.selections.json for reproducible unittests.
- Fix deprecations and breakage on DMD 2.097.0.
- Fix that decoding of nested object in array from JSONValue with alias this would drop every second value.
- Support
@(Xml.Element)
/@(Xml.Attribute)
without a name. ForXml.Element
, the name of the type is used. ForXml.Attribute
, the name of the field is used.
- When encountering a JSON decoding compile error, log the sequence of types that led to the error.
- json: Throw
JSONException
when attempting to decode non-object as object.
- Improve error handling in
text.json.Enum
.
- add
text.json.Enum
with helper functions to encode and decode enums into JSON-style "SCREAMING_SNAKE_CASE" strings.
- fix depreation for 2.094.1
- Allow decoding of immutable associative arrays.
- Revert 1.1.3
- Implement different solution: remove problematic
foreach (...; readArray)
.
- Support
decode!(const JSONValue)
.
- Fix typo in
text.json.Encode
.
- Fix JSON encoding of classes.
- Remove pointless
@disable this(this)
that was breaking array-of-struct decoding.
- Remove file that was breaking LDC build via ldc-developers/ldc#3344 .
- Include a copy of std_data_json and taggedalgebraic directly. Work around DMD bug 21235 by hacking opEquals to be non-templated. This change should be reverted once the upstream issues are fixed. (Hah. Right.)
- Allow loading any type with a
fromString
static method from a string, such as an XML attribute.
- Remember to pop stream for numbers when decoding JSONValue.
- Initial version: move text.xml, text.json over from internal Utilities repo; switch json decoding to stdx_data_json.