From 002d8f5cf9b1294d35dd2f18a9a0f2896e2c3af4 Mon Sep 17 00:00:00 2001 From: njlr Date: Sat, 30 Mar 2024 17:49:04 +0000 Subject: [PATCH 1/5] Change Encoder type to return IEncodable, deferring concrete representation --- packages/Thoth.Json.Core/Encode.fs | 188 ++++++++++++++++------- packages/Thoth.Json.Core/Types.fs | 7 +- packages/Thoth.Json.JavaScript/Encode.fs | 2 +- packages/Thoth.Json.Newtonsoft/Encode.fs | 2 +- packages/Thoth.Json.Python/Encode.fs | 2 +- tests/Thoth.Json.Tests/Util.fs | 2 +- 6 files changed, 145 insertions(+), 58 deletions(-) diff --git a/packages/Thoth.Json.Core/Encode.fs b/packages/Thoth.Json.Core/Encode.fs index 47d878b..22d9990 100644 --- a/packages/Thoth.Json.Core/Encode.fs +++ b/packages/Thoth.Json.Core/Encode.fs @@ -7,24 +7,89 @@ open System [] module Encode = - let inline string value = Json.String value - let inline char value = Json.Char value + let inline string value = + { + new IEncodable with + member this.Encode(helpers) = + helpers.encodeString(value) + } + + let inline char value = + { + new IEncodable with + member this.Encode(helpers) = + helpers.encodeChar(value) + } + let inline guid value = value.ToString() |> string - let inline float value = Json.DecimalNumber value + + let inline float value = + { + new IEncodable with + member this.Encode(helpers) = + helpers.encodeDecimalNumber(value) + } let float32 (value: float32) = - Json.DecimalNumber(Operators.float value) + float (Operators.float value) let inline decimal (value: decimal) = value.ToString(CultureInfo.InvariantCulture) |> string - let inline nil<'T> = Json.Null - let inline bool value = Json.Boolean value - let inline object values = Json.Object values - let inline array values = Json.Array values - let list values = Json.Array(values |> List.toArray) - let seq values = Json.Array(values |> Seq.toArray) - let dict (values: Map) : Json = values |> Map.toList |> object + let inline nil<'T> = + { + new IEncodable with + member this.Encode(helpers) = + helpers.encodeNull() + } + + let inline bool value = + { + new IEncodable with + member this.Encode(helpers) = + helpers.encodeBool(value) + } + + let inline object (values : seq) = + { + new IEncodable with + member this.Encode(helpers) = + let o = helpers.createEmptyObject() + for k, v in values do + let ve = v.Encode(helpers) + helpers.setPropertyOnObject(o, k, ve) + o + } + + let inline array (values : IEncodable array) = + { + new IEncodable with + member this.Encode(helpers) = + values + |> Array.map (fun v -> v.Encode(helpers)) + |> helpers.encodeArray + } + + let list (values : IEncodable list) = + { + new IEncodable with + member this.Encode(helpers) = + values + |> List.map (fun v -> v.Encode(helpers)) + |> helpers.encodeList + } + + let seq (values : IEncodable seq) = + { + new IEncodable with + member this.Encode(helpers) = + values + |> Seq.map (fun v -> v.Encode(helpers)) + |> helpers.encodeSeq + } + + let dict (values: Map) : IEncodable = + values |> Map.toSeq |> object let inline bigint (value: bigint) = value.ToString() |> string @@ -36,12 +101,47 @@ module Encode = let inline datetime (value: DateTime) = value.ToString("O", CultureInfo.InvariantCulture) |> string - let inline sbyte (value: sbyte) = Json.IntegralNumber(uint32 value) - let inline byte (value: byte) = Json.IntegralNumber(uint32 value) - let inline int16 (value: int16) = Json.IntegralNumber(uint32 value) - let inline uint16 (value: uint16) = Json.IntegralNumber(uint32 value) - let inline int (value: int) = Json.IntegralNumber(uint32 value) - let inline uint32 (value: uint32) = Json.IntegralNumber value + let inline sbyte (value: sbyte) = + { + new IEncodable with + member this.Encode(helpers) = + helpers.encodeIntegralNumber(uint32 value) + } + + let inline byte (value: byte) = + { + new IEncodable with + member this.Encode(helpers) = + helpers.encodeIntegralNumber(uint32 value) + } + + let inline int16 (value: int16) = + { + new IEncodable with + member this.Encode(helpers) = + helpers.encodeIntegralNumber(uint32 value) + } + + let inline uint16 (value: uint16) = + { + new IEncodable with + member this.Encode(helpers) = + helpers.encodeIntegralNumber(uint32 value) + } + + let inline int (value: int) = + { + new IEncodable with + member this.Encode(helpers) = + helpers.encodeIntegralNumber(uint32 value) + } + + let inline uint32 (value: uint32) = + { + new IEncodable with + member this.Encode(helpers) = + helpers.encodeIntegralNumber(value) + } let inline int64 (value: int64) = value.ToString(CultureInfo.InvariantCulture) |> string @@ -49,9 +149,9 @@ module Encode = let inline uint64 (value: uint64) = value.ToString(CultureInfo.InvariantCulture) |> string - let inline unit () = Json.Unit + let inline unit () = nil - let tuple2 (enc1: Encoder<'T1>) (enc2: Encoder<'T2>) (v1, v2) : Json = + let tuple2 (enc1: Encoder<'T1>) (enc2: Encoder<'T2>) (v1, v2) : IEncodable = array [| enc1 v1 @@ -63,7 +163,7 @@ module Encode = (enc2: Encoder<'T2>) (enc3: Encoder<'T3>) (v1, v2, v3) - : Json + : IEncodable = array [| @@ -78,7 +178,7 @@ module Encode = (enc3: Encoder<'T3>) (enc4: Encoder<'T4>) (v1, v2, v3, v4) - : Json + : IEncodable = array [| @@ -95,7 +195,7 @@ module Encode = (enc4: Encoder<'T4>) (enc5: Encoder<'T5>) (v1, v2, v3, v4, v5) - : Json + : IEncodable = array [| @@ -114,7 +214,7 @@ module Encode = (enc5: Encoder<'T5>) (enc6: Encoder<'T6>) (v1, v2, v3, v4, v5, v6) - : Json + : IEncodable = array [| @@ -135,7 +235,7 @@ module Encode = (enc6: Encoder<'T6>) (enc7: Encoder<'T7>) (v1, v2, v3, v4, v5, v6, v7) - : Json + : IEncodable = array [| @@ -158,7 +258,7 @@ module Encode = (enc7: Encoder<'T7>) (enc8: Encoder<'T8>) (v1, v2, v3, v4, v5, v6, v7, v8) - : Json + : IEncodable = array [| @@ -177,7 +277,7 @@ module Encode = (keyEncoder: Encoder<'key>) (valueEncoder: Encoder<'value>) (values: Map<'key, 'value>) - : Json + : IEncodable = values |> Map.toList @@ -190,44 +290,26 @@ module Encode = module Enum = - let byte<'TEnum when 'TEnum: enum> (value: 'TEnum) : Json = + let byte<'TEnum when 'TEnum: enum> (value: 'TEnum) : IEncodable = LanguagePrimitives.EnumToValue value |> byte - let sbyte<'TEnum when 'TEnum: enum> (value: 'TEnum) : Json = + let sbyte<'TEnum when 'TEnum: enum> (value: 'TEnum) : IEncodable = LanguagePrimitives.EnumToValue value |> sbyte - let int16<'TEnum when 'TEnum: enum> (value: 'TEnum) : Json = + let int16<'TEnum when 'TEnum: enum> (value: 'TEnum) : IEncodable = LanguagePrimitives.EnumToValue value |> int16 - let uint16<'TEnum when 'TEnum: enum> (value: 'TEnum) : Json = + let uint16<'TEnum when 'TEnum: enum> (value: 'TEnum) : IEncodable = LanguagePrimitives.EnumToValue value |> uint16 - let int<'TEnum when 'TEnum: enum> (value: 'TEnum) : Json = + let int<'TEnum when 'TEnum: enum> (value: 'TEnum) : IEncodable = LanguagePrimitives.EnumToValue value |> int - let uint32<'TEnum when 'TEnum: enum> (value: 'TEnum) : Json = + let uint32<'TEnum when 'TEnum: enum> (value: 'TEnum) : IEncodable = LanguagePrimitives.EnumToValue value |> uint32 - let option (encoder: 'a -> Json) = + let option (encoder: Encoder<'a>) = Option.map encoder >> Option.defaultWith (fun _ -> nil) - let rec toJsonValue (helpers: IEncoderHelpers<'JsonValue>) (json: Json) = - match json with - | Json.String value -> helpers.encodeString value - | Json.IntegralNumber value -> helpers.encodeIntegralNumber value - | Json.Object values -> - let o = helpers.createEmptyObject () - - values - |> Seq.iter (fun (k, v) -> - helpers.setPropertyOnObject (o, k, toJsonValue helpers v) - ) - - o - | Json.Char value -> helpers.encodeChar value - | Json.DecimalNumber value -> helpers.encodeDecimalNumber value - | Json.Null -> helpers.encodeNull () - | Json.Boolean value -> helpers.encodeBool value - | Json.Array value -> - value |> Array.map (toJsonValue helpers) |> helpers.encodeArray - | Json.Unit -> helpers.encodeNull () + let rec toJsonValue (helpers: IEncoderHelpers<'JsonValue>) (json: IEncodable) = + json.Encode(helpers) diff --git a/packages/Thoth.Json.Core/Types.fs b/packages/Thoth.Json.Core/Types.fs index d2a23fc..b8eac69 100644 --- a/packages/Thoth.Json.Core/Types.fs +++ b/packages/Thoth.Json.Core/Types.fs @@ -73,4 +73,9 @@ type Json = | IntegralNumber of uint32 | Unit -type Encoder<'T> = 'T -> Json +type IEncodable = + abstract member Encode<'JsonValue> : + helpers: IEncoderHelpers<'JsonValue> -> + 'JsonValue + +type Encoder<'T> = 'T -> IEncodable diff --git a/packages/Thoth.Json.JavaScript/Encode.fs b/packages/Thoth.Json.JavaScript/Encode.fs index d3152b4..f5cae51 100644 --- a/packages/Thoth.Json.JavaScript/Encode.fs +++ b/packages/Thoth.Json.JavaScript/Encode.fs @@ -27,6 +27,6 @@ module Encode = member _.encodeIntegralNumber value = box value } - let toString (space: int) (value: Json) : string = + let toString (space: int) (value: IEncodable) : string = let json = Encode.toJsonValue helpers value JS.JSON.stringify (json, space = space) diff --git a/packages/Thoth.Json.Newtonsoft/Encode.fs b/packages/Thoth.Json.Newtonsoft/Encode.fs index d7b78a3..7cd6401 100644 --- a/packages/Thoth.Json.Newtonsoft/Encode.fs +++ b/packages/Thoth.Json.Newtonsoft/Encode.fs @@ -37,7 +37,7 @@ module Encode = JValue(uint64 value) } - let toString (space: int) (value: Json) : string = + let toString (space: int) (value: IEncodable) : string = let format = if space = 0 then Formatting.None diff --git a/packages/Thoth.Json.Python/Encode.fs b/packages/Thoth.Json.Python/Encode.fs index 3db1f8b..66003d6 100644 --- a/packages/Thoth.Json.Python/Encode.fs +++ b/packages/Thoth.Json.Python/Encode.fs @@ -27,7 +27,7 @@ module Encode = member _.encodeIntegralNumber value = box value } - let toString (space: int) (value: Json) : string = + let toString (space: int) (value: IEncodable) : string = let json = Encode.toJsonValue helpers value // If we pass an indention of 0 to Python's json.dumps, it will // insert newlines, between each element instead of compressing diff --git a/tests/Thoth.Json.Tests/Util.fs b/tests/Thoth.Json.Tests/Util.fs index 489fe53..b53d116 100644 --- a/tests/Thoth.Json.Tests/Util.fs +++ b/tests/Thoth.Json.Tests/Util.fs @@ -25,7 +25,7 @@ open Thoth.Json.Core // abstract type IEncode = - abstract toString: int -> Json -> string + abstract toString: int -> IEncodable -> string type IDecode = abstract fromString<'T> : Decoder<'T> -> string -> Result<'T, string> From 88f88f3b6408ec6f0c72a3f1a2940023ff9d08a0 Mon Sep 17 00:00:00 2001 From: njlr Date: Sat, 30 Mar 2024 22:54:14 +0000 Subject: [PATCH 2/5] Change rec to inline --- packages/Thoth.Json.Core/Encode.fs | 157 ++++++++++++++--------------- 1 file changed, 76 insertions(+), 81 deletions(-) diff --git a/packages/Thoth.Json.Core/Encode.fs b/packages/Thoth.Json.Core/Encode.fs index 22d9990..4c888f4 100644 --- a/packages/Thoth.Json.Core/Encode.fs +++ b/packages/Thoth.Json.Core/Encode.fs @@ -8,84 +8,71 @@ open System module Encode = let inline string value = - { - new IEncodable with - member this.Encode(helpers) = - helpers.encodeString(value) + { new IEncodable with + member this.Encode(helpers) = helpers.encodeString (value) } let inline char value = - { - new IEncodable with - member this.Encode(helpers) = - helpers.encodeChar(value) + { new IEncodable with + member this.Encode(helpers) = helpers.encodeChar (value) } let inline guid value = value.ToString() |> string let inline float value = - { - new IEncodable with - member this.Encode(helpers) = - helpers.encodeDecimalNumber(value) + { new IEncodable with + member this.Encode(helpers) = helpers.encodeDecimalNumber (value) } - let float32 (value: float32) = - float (Operators.float value) + let float32 (value: float32) = float (Operators.float value) let inline decimal (value: decimal) = value.ToString(CultureInfo.InvariantCulture) |> string let inline nil<'T> = - { - new IEncodable with - member this.Encode(helpers) = - helpers.encodeNull() + { new IEncodable with + member this.Encode(helpers) = helpers.encodeNull () } let inline bool value = - { - new IEncodable with - member this.Encode(helpers) = - helpers.encodeBool(value) + { new IEncodable with + member this.Encode(helpers) = helpers.encodeBool (value) } - let inline object (values : seq) = - { - new IEncodable with - member this.Encode(helpers) = - let o = helpers.createEmptyObject() - for k, v in values do - let ve = v.Encode(helpers) - helpers.setPropertyOnObject(o, k, ve) - o + let inline object (values: seq) = + { new IEncodable with + member this.Encode(helpers) = + let o = helpers.createEmptyObject () + + for k, v in values do + let ve = v.Encode(helpers) + helpers.setPropertyOnObject (o, k, ve) + + o } - let inline array (values : IEncodable array) = - { - new IEncodable with - member this.Encode(helpers) = - values - |> Array.map (fun v -> v.Encode(helpers)) - |> helpers.encodeArray + let inline array (values: IEncodable array) = + { new IEncodable with + member this.Encode(helpers) = + values + |> Array.map (fun v -> v.Encode(helpers)) + |> helpers.encodeArray } - let list (values : IEncodable list) = - { - new IEncodable with - member this.Encode(helpers) = - values - |> List.map (fun v -> v.Encode(helpers)) - |> helpers.encodeList + let list (values: IEncodable list) = + { new IEncodable with + member this.Encode(helpers) = + values + |> List.map (fun v -> v.Encode(helpers)) + |> helpers.encodeList } - let seq (values : IEncodable seq) = - { - new IEncodable with - member this.Encode(helpers) = - values - |> Seq.map (fun v -> v.Encode(helpers)) - |> helpers.encodeSeq + let seq (values: IEncodable seq) = + { new IEncodable with + member this.Encode(helpers) = + values + |> Seq.map (fun v -> v.Encode(helpers)) + |> helpers.encodeSeq } let dict (values: Map) : IEncodable = @@ -102,45 +89,38 @@ module Encode = value.ToString("O", CultureInfo.InvariantCulture) |> string let inline sbyte (value: sbyte) = - { - new IEncodable with - member this.Encode(helpers) = - helpers.encodeIntegralNumber(uint32 value) + { new IEncodable with + member this.Encode(helpers) = + helpers.encodeIntegralNumber (uint32 value) } let inline byte (value: byte) = - { - new IEncodable with - member this.Encode(helpers) = - helpers.encodeIntegralNumber(uint32 value) + { new IEncodable with + member this.Encode(helpers) = + helpers.encodeIntegralNumber (uint32 value) } let inline int16 (value: int16) = - { - new IEncodable with - member this.Encode(helpers) = - helpers.encodeIntegralNumber(uint32 value) + { new IEncodable with + member this.Encode(helpers) = + helpers.encodeIntegralNumber (uint32 value) } let inline uint16 (value: uint16) = - { - new IEncodable with - member this.Encode(helpers) = - helpers.encodeIntegralNumber(uint32 value) + { new IEncodable with + member this.Encode(helpers) = + helpers.encodeIntegralNumber (uint32 value) } let inline int (value: int) = - { - new IEncodable with - member this.Encode(helpers) = - helpers.encodeIntegralNumber(uint32 value) + { new IEncodable with + member this.Encode(helpers) = + helpers.encodeIntegralNumber (uint32 value) } let inline uint32 (value: uint32) = - { - new IEncodable with - member this.Encode(helpers) = - helpers.encodeIntegralNumber(value) + { new IEncodable with + member this.Encode(helpers) = helpers.encodeIntegralNumber (value) } let inline int64 (value: int64) = @@ -293,23 +273,38 @@ module Encode = let byte<'TEnum when 'TEnum: enum> (value: 'TEnum) : IEncodable = LanguagePrimitives.EnumToValue value |> byte - let sbyte<'TEnum when 'TEnum: enum> (value: 'TEnum) : IEncodable = + let sbyte<'TEnum when 'TEnum: enum> + (value: 'TEnum) + : IEncodable + = LanguagePrimitives.EnumToValue value |> sbyte - let int16<'TEnum when 'TEnum: enum> (value: 'TEnum) : IEncodable = + let int16<'TEnum when 'TEnum: enum> + (value: 'TEnum) + : IEncodable + = LanguagePrimitives.EnumToValue value |> int16 - let uint16<'TEnum when 'TEnum: enum> (value: 'TEnum) : IEncodable = + let uint16<'TEnum when 'TEnum: enum> + (value: 'TEnum) + : IEncodable + = LanguagePrimitives.EnumToValue value |> uint16 let int<'TEnum when 'TEnum: enum> (value: 'TEnum) : IEncodable = LanguagePrimitives.EnumToValue value |> int - let uint32<'TEnum when 'TEnum: enum> (value: 'TEnum) : IEncodable = + let uint32<'TEnum when 'TEnum: enum> + (value: 'TEnum) + : IEncodable + = LanguagePrimitives.EnumToValue value |> uint32 let option (encoder: Encoder<'a>) = Option.map encoder >> Option.defaultWith (fun _ -> nil) - let rec toJsonValue (helpers: IEncoderHelpers<'JsonValue>) (json: IEncodable) = + let inline toJsonValue + (helpers: IEncoderHelpers<'JsonValue>) + (json: IEncodable) + = json.Encode(helpers) From 797bdc23a0666ac766e2fb4ee5ea951ea77146e8 Mon Sep 17 00:00:00 2001 From: Maxime Mangel Date: Sat, 4 May 2024 16:02:15 +0200 Subject: [PATCH 3/5] style: remove some parentheses and alias `this` to `_` if not needed [core] --- packages/Thoth.Json.Core/Encode.fs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/Thoth.Json.Core/Encode.fs b/packages/Thoth.Json.Core/Encode.fs index 4c888f4..cc41439 100644 --- a/packages/Thoth.Json.Core/Encode.fs +++ b/packages/Thoth.Json.Core/Encode.fs @@ -9,19 +9,19 @@ module Encode = let inline string value = { new IEncodable with - member this.Encode(helpers) = helpers.encodeString (value) + member _.Encode(helpers) = helpers.encodeString value } let inline char value = { new IEncodable with - member this.Encode(helpers) = helpers.encodeChar (value) + member _.Encode(helpers) = helpers.encodeChar value } let inline guid value = value.ToString() |> string let inline float value = { new IEncodable with - member this.Encode(helpers) = helpers.encodeDecimalNumber (value) + member _.Encode(helpers) = helpers.encodeDecimalNumber value } let float32 (value: float32) = float (Operators.float value) @@ -31,17 +31,17 @@ module Encode = let inline nil<'T> = { new IEncodable with - member this.Encode(helpers) = helpers.encodeNull () + member _.Encode(helpers) = helpers.encodeNull () } let inline bool value = { new IEncodable with - member this.Encode(helpers) = helpers.encodeBool (value) + member _.Encode(helpers) = helpers.encodeBool value } let inline object (values: seq) = { new IEncodable with - member this.Encode(helpers) = + member _.Encode(helpers) = let o = helpers.createEmptyObject () for k, v in values do @@ -53,7 +53,7 @@ module Encode = let inline array (values: IEncodable array) = { new IEncodable with - member this.Encode(helpers) = + member _.Encode(helpers) = values |> Array.map (fun v -> v.Encode(helpers)) |> helpers.encodeArray @@ -61,7 +61,7 @@ module Encode = let list (values: IEncodable list) = { new IEncodable with - member this.Encode(helpers) = + member _.Encode(helpers) = values |> List.map (fun v -> v.Encode(helpers)) |> helpers.encodeList @@ -69,7 +69,7 @@ module Encode = let seq (values: IEncodable seq) = { new IEncodable with - member this.Encode(helpers) = + member _.Encode(helpers) = values |> Seq.map (fun v -> v.Encode(helpers)) |> helpers.encodeSeq @@ -90,37 +90,37 @@ module Encode = let inline sbyte (value: sbyte) = { new IEncodable with - member this.Encode(helpers) = + member _.Encode(helpers) = helpers.encodeIntegralNumber (uint32 value) } let inline byte (value: byte) = { new IEncodable with - member this.Encode(helpers) = + member _.Encode(helpers) = helpers.encodeIntegralNumber (uint32 value) } let inline int16 (value: int16) = { new IEncodable with - member this.Encode(helpers) = + member _.Encode(helpers) = helpers.encodeIntegralNumber (uint32 value) } let inline uint16 (value: uint16) = { new IEncodable with - member this.Encode(helpers) = + member _.Encode(helpers) = helpers.encodeIntegralNumber (uint32 value) } let inline int (value: int) = { new IEncodable with - member this.Encode(helpers) = + member _.Encode(helpers) = helpers.encodeIntegralNumber (uint32 value) } let inline uint32 (value: uint32) = { new IEncodable with - member this.Encode(helpers) = helpers.encodeIntegralNumber (value) + member _.Encode(helpers) = helpers.encodeIntegralNumber (value) } let inline int64 (value: int64) = From afa6ac98946f61b5cce4d5ca4c71a2a1f6b8c972 Mon Sep 17 00:00:00 2001 From: Maxime Mangel Date: Sat, 4 May 2024 16:15:14 +0200 Subject: [PATCH 4/5] fix: fix `encodeList` and `encodeSeq` [python] --- packages/Thoth.Json.Python/Encode.fs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/Thoth.Json.Python/Encode.fs b/packages/Thoth.Json.Python/Encode.fs index 66003d6..93ab493 100644 --- a/packages/Thoth.Json.Python/Encode.fs +++ b/packages/Thoth.Json.Python/Encode.fs @@ -21,8 +21,12 @@ module Encode = o?(key) <- value member _.encodeArray values = values - member _.encodeList values = JS.Constructors.Array.from values - member _.encodeSeq values = JS.Constructors.Array.from values + + member this.encodeList values = + values |> List.toArray |> this.encodeArray + + member this.encodeSeq values = + values |> Seq.toArray |> this.encodeArray member _.encodeIntegralNumber value = box value } From a15639938651fc86a1858cba12c7735fa37c2c81 Mon Sep 17 00:00:00 2001 From: Maxime Mangel Date: Sat, 4 May 2024 16:22:55 +0200 Subject: [PATCH 5/5] chore: update changelog files --- packages/Thoth.Json.Core/CHANGELOG.md | 4 ++++ packages/Thoth.Json.JavaScript/CHANGELOG.md | 4 ++++ packages/Thoth.Json.Newtonsoft/CHANGELOG.md | 4 ++++ packages/Thoth.Json.Python/CHANGELOG.md | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/packages/Thoth.Json.Core/CHANGELOG.md b/packages/Thoth.Json.Core/CHANGELOG.md index c680a45..54c88f7 100644 --- a/packages/Thoth.Json.Core/CHANGELOG.md +++ b/packages/Thoth.Json.Core/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Changed + +* Rework encoder API to not need a custom DU ([GH-188](https://github.com/thoth-org/Thoth.Json/pull/188/)) + ## 0.2.1 - 2023-12-12 ### Fixed diff --git a/packages/Thoth.Json.JavaScript/CHANGELOG.md b/packages/Thoth.Json.JavaScript/CHANGELOG.md index d29c3fe..423c08b 100644 --- a/packages/Thoth.Json.JavaScript/CHANGELOG.md +++ b/packages/Thoth.Json.JavaScript/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Changed + +* Rework encoder API to not need a custom DU ([GH-188](https://github.com/thoth-org/Thoth.Json/pull/188/)) + ### Added * `Decode.unsafeFromString` diff --git a/packages/Thoth.Json.Newtonsoft/CHANGELOG.md b/packages/Thoth.Json.Newtonsoft/CHANGELOG.md index d29c3fe..423c08b 100644 --- a/packages/Thoth.Json.Newtonsoft/CHANGELOG.md +++ b/packages/Thoth.Json.Newtonsoft/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Changed + +* Rework encoder API to not need a custom DU ([GH-188](https://github.com/thoth-org/Thoth.Json/pull/188/)) + ### Added * `Decode.unsafeFromString` diff --git a/packages/Thoth.Json.Python/CHANGELOG.md b/packages/Thoth.Json.Python/CHANGELOG.md index f08504d..f4808b5 100644 --- a/packages/Thoth.Json.Python/CHANGELOG.md +++ b/packages/Thoth.Json.Python/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Changed + +* Rework encoder API to not need a custom DU ([GH-188](https://github.com/thoth-org/Thoth.Json/pull/188/)) + ## 0.2.0 - 2024-04-03 ### Added