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.
- Upgrade to Newtonsoft.Json 13.0.1 to fix security vulnerability
- Guard
decodeMaybeNull
to evaluates thedecoder
only if the value is notnull
- Fix #51: Relax
Fable.Core
restriction to>= 3
allowing use of Fable.Core 4
- Don't throw when union doesn't contain field values
-
BREAKING CHANGE: Encode
sbyte
,byte
,int16
,uint16
,uint32
using integer representation instead of decimal.12u
is represented using12
instead of12.0
. I don't know why Newtonsoft.Json defaults to decimal representation for these types. -
Fix path when auto decoding unions
-
Fix auto coders for nested anon records
- Add source link support.
- Add
Decode.map'
andEncode.map
to supportMap<'Key, 'Value>
- Add
Decode.datetimeUtc
,Decode.datetimeLocal
- Add
Encode.Auto.toString(value)
which is equivalent toEncode.Auto.toString(0, value)
- Add doc comment to
Decode.fromValue
,Decode.fromString
,Decode.unsafeFromString
- Add support for
char
- Add link to the "extra coders" section when coders fail for missing types information
- Add
Decode.andMap
allowing to decoder large objects incrementally
- Capture
JsonException
instead ofJsonReaderException
this seems to cover more cases (by @PierreYvesR)
- Mark
Decode.datetime
as deprecated
- BREAKING CHANGE: Represent
sbyte
using number instead of string. - BREAKING CHANGE: Represent
byte
using number instead of string. - BREAKING CHANGE: Represent
int16
using number instead of string. - BREAKING CHANGE: Represent
uint16
using number instead of string.
- Fix #42: Force Newtonsoft to consider the whole JSON at once and not token per token
- PR #24: Remove broken Converter, people can use https://github.com/DnnFable/Thoth.Json.Net.Formatter as a replacement (by @SCullman)
- PR #44: Port API change from Thoth.Json [v6.0.0] Expose the helpers module so it can be used for custom decoders (by @weslenng)
- PR #43: Port API change from Thoth.Json [v5.1.0] Improve tree shaking for longs (by @weslenng)
- Fix #30: Fix Decode.Auto support for StringEnum
- PR #39: optionalAt now returns
Ok None
even when the path does not exist (by @rommsen)
- isCamelCase is now replaced by caseStrategy=CamelCase
- Added caseStrategy that accept CamelCase | PascalCase | SnakeCase
- Add supports for
byte
- Add supports for
sbyte
- Add supports for
int16>
- Add supports for
uint16
- Add supports for
uint32
- Add supports for
float32
- Add supports for
enum<byte>
- Add supports for
enum<sbyte>
- Add supports for
enum<int16>
- Add supports for
enum<uint16>
- Add supports for
enum<int>
- Add supports for
enum<uint32>
- Add support for
unit
- Allow to configure if
null
field should be omitted or no. SetskipNullField
tofalse
when using auto encoder, to includemyField: null
in your json output
- Fix #18: Remove the cache limitation when using generateDecoderCached (by &SCullman)
- Fix Encode.decimal comment (by @alfonsogarciacaro)
- Release stable version
- Stop using first person when reporting an error. Related to thoth-org/Thoth.Json#19
- Use
dotnet pack
to generate the package - Add upper restriction to
Fable.Core
- Stop using first person when reporting an error. Related to thoth-org/Thoth.Json#19
- Use
paket.template
to generate the nupkg. The goal is to have "correct" dependencies handling
Decode.Auto.LowLevel
providing better interop when consuming Thoth.Json.Net from a C# projectEncode.Auto.LowLevel
providing better interop when consuming Thoth.Json.Net from a C# project- (Json)Converter, this is needed for people using Asp.Net WebApi (by @SCullman)
- Fix #11: Replicate Fable behaviour when encoding
StringEnum
. Only when not on NETFRAMEWORK!!!
- Ensure that Thoth.Json.Net references the minimum allowed version of Newtonsoft.Json (by @bentayloruk)
- Fix #12: Support auto coders with recursive types (by @alfonsogarciacaro)
- Fix #13: Decode.string fails on strings with datetime
- Fix auto encoder when generating an optinal unkown type and the runtime value is
None
- Release stable version
- Lower requested version of Newtonsoft to
>=11.0.2
- Fix Decode.oneOf in combination with object builder (by @alfonsogarciacaro)
- Make
Decode.field
consistant and report the exact error - Make
Decode.at
bconsistant and report the exact error
- Make Decode.object output 1 error or all the errors if there are severals
- Improve BadOneOf errors readibility
- Adding
TimeSpan
support (by @rfrerebe)
- Add
Set
support in auto coders (by @alfonsogarciacaro) - Add
extra
support to auto coders. So people can now override/extends auto coders capabilities (by @alfonsogarciacaro)
- Use reflection for auto encoders just as auto decoders. This will help keep the JSON representatin in synx between manual and auto coders (by @alfonsogarciacaro)
Decode.datetime
always outputs universal time (by @alfonsogarciacaro)- If a coder is missing, auto coders will fail on generation phase instead of coder evaluation phase (by @alfonsogarciacaro)
- By default
int64
-uint64
-bigint
-decimal
support is being disabled from auto coders to reduce bundle size (by @alfonsogarciacaro)
- Mark
Decode.unwrap
as private. It's now only used internally for object builder. This will encourage people to useDecode.fromValue
.
- Make auto decoder support record/unions with private constructors
- Make auto decoder succeeds on Class marked as optional
- Added CultureInfo.InvariantCulture to all Encoder functions where it was possible (by @draganjovanovic1)
- Fix #59: Make auto decoder support optional fields when missing from JSON
- Fix #61: Support object keys with JsonPath characters when using
Decode.dict
- Fix #51: Add support for
Raw
decoder in object builders
- Re-add optional and optionalAt related to #51
- Various improvements for Primitive types improvements (by @draganjovanovic1)
- Fix decoding of optional fields (by @eugene-g)
- Fix nested object builder (ex: get.Optional.Field > get.Required.Field)
- Fix exception handling
- Release stable
- Add Encoders for all the equivalent Decoders
- Make auto decoder safe by default
- Fix
Decode.decodeString
signature
- Support auto decoders and encoders
- Add object builder style for the decoders
- Better error, by now tracking the path
- Mark
Encode.encode
,Decode.decodeString
,Decode.decodeValue
as obsoletes
- Remove pipeline style for the decoders
- Ensure that
field
at
optional
optionalAt
works with object
- A float from int works
- Initial release