jsony icon indicating copy to clipboard operation
jsony copied to clipboard

releasing deserialization with default values

Open lucidrains opened this issue 7 months ago • 3 comments

hello! thanks for this great library!

i was wondering if you could possibly release this functionality

thank you in advance

lucidrains avatar Jul 23 '25 16:07 lucidrains

In other words, the request is to create a new release. @treeform if you're busy we could help maintain the library.

esafak avatar Jul 30 '25 00:07 esafak

Second the need for a new release. Just went to report an issue and realised it's fixed upstream but there hasn't been a release in two years

PMunch avatar Oct 13 '25 10:10 PMunch

The fix is also incomplete:

type
  Frog = object
    leftLeg: Leg
  Leg = object
    length: int = 2

let s = """{"leftLeg":{}}"""
let f = s.fromJson(Frog)
doAssert f.leftLeg.length == 2 # fail; it's 0

laylie527 avatar Nov 02 '25 07:11 laylie527