Releases: fluidsonic/fluid-json
Releases · fluidsonic/fluid-json
0.9.11
Housekeeping
- reworked Gradle configuration & also released library on Bintray
0.9.10
Features
JSONException
is now abstract and uses more specific subclasses and reports JSON path and parser offset relevant for each error- added
JSONReader.readOrNull { … }
- added
JSONWriter.writeOrNull(value) { … }
- added
JSONPath
, accessible usingJSONReader.path
andJSONWriter.path
andJSONException.path
- added
JSONReader.offset
- added
JSONReader.isolatedValueRead
andJSONWriter.isolatedValueWrite
which area already used behind the scene to catch common mistakes when using these classes, e.g. when implementing codecs
Housekeeping
- removed duplicate method
JSONReader.readElementsFromMap
(duplicates.readFromMapByElementValue
) - marked many lambda parameters as
crossinline
to prevent inconsistent states which cause hard-to-spot mistakes
Migration from 0.9.9
JSONException
is now abstract. Use the appropriate .Parsing
, .Schema
, .Syntax
or .Serialization
subclass as explained in Error Handling.
There are also shortcuts for common errors in codecs and which throw appropriate exceptions including parsing offset and JSON path:
JSONDecoder.invalidPropertyError(property: String, details: String)
JSONDecoder.invalidValueError(details: String)
JSONDecoder.missingPropertyError(property: String)
JSONDecoder.parsingError(message: String)
JSONDecoder.schemaError(message: String)
JSONEncoder.serializationError(message: String)
0.9.9
Features
- [8951ecc] Ktor Client support
Housekeeping
- [239738b] encoder/decoder in Codecs are now receiver parameters
Migration from 0.9.8
in JSONDecoderCodec
s:
override fun decode(valueType: JSONCodingType<in Value>, decoder: JSONDecoder<JSONCodingContext>) =
decoder.read…()
→
override fun JSONDecoder<JSONCodingContext>.decode(valueType: JSONCodingType<in Value>) =
read…()
in JSONEncoderCodec
s:
override fun encode(value: Value, encoder: JSONEncoder<JSONCodingContext>) {
encoder.write…(value)
}
→
override fun JSONEncoder<JSONCodingContext>.encode(value: Value) {
write…(value)
}
0.9.8
0.9.7
Features
- Java 7 support
Housekeeping
- [bb087cd] updated API and separated basic & coding
Migration from 0.9.6
- change the artifact id from
fluid-json
tofluid-json-coding-jdk8
,fluid-json-coding
orfluid-json-basic
depending on needed functionality and Java version - change
jsonCodableType
tojsonCodingType
- change
JSONCodableType
toJSONCodingType
- change
JSONCodableTypeReference
toJSONCodingTypeReference
- change
JSONCoderContext
toJSONCodingContext
- change
JSONParser
toJSONCodingParser
(unless you only need the basic functionality) - change
JSONSerializer
toJSONCodingSerializer
(unless you only need the basic functionality)