I tried deser_json and I get the same errors. I fixed hasCustomPragma with 
`import macros` but then I get `m.tokens[pos].kind == JSMN_OBJECT` ... I don't 
know how to get around that one.

If you want to use json (for easier debugging or compatibility) take a look at 
these libraries they pass my tests:

## Serialize speed
    
    
    name ............................... min time      avg time    std dv  times
    treeform/jsony ..................... 1.531 ms      2.779 ms    ±0.091   x100
    status-im/nim-json-serialization ... 2.043 ms      3.448 ms    ±0.746   x100
    planetis-m/eminim .................. 5.951 ms      9.305 ms    ±3.210   x100
    disruptek/jason ................... 10.312 ms     13.471 ms    ±3.107   x100
    nim std/json ...................... 12.551 ms     19.419 ms    ±4.039   x100
    
    
    Run

## Deserialize speed
    
    
    name ............................... min time      avg time    std dv  times
    treeform/jsony ..................... 6.724 ms     12.047 ms    ±3.694   x100
    status-im/nim-json-serialization ... 7.119 ms     14.276 ms    ±2.033   x100
    nim std/json ...................... 24.141 ms     38.741 ms    ±5.417   x100
    planetis-m/eminim ................. 10.974 ms     18.355 ms    ±3.994   x100
    
    
    Run

<https://github.com/treeform/jsony>

But really if you want to go fast you might want a binary format instead of 
json:

## Serialize speed
    
    
    name ............................... min time      avg time    std dv   runs
    treeform/flatty .................... 3.615 ms      3.712 ms    ±0.084   x100
    bingod/planetis-m .................. 6.632 ms      6.785 ms    ±0.105   x100
    disruptek/frosty ................... 9.133 ms      9.294 ms    ±0.152   x100
    treeform/jsony ..................... 7.746 ms      7.858 ms    ±0.081   x100
    
    
    Run

## Deserialize speed
    
    
    treeform/flatty .................... 7.849 ms     11.745 ms    ±0.157   x100
    bingod/planetis-m binTo ............ 8.414 ms     13.114 ms    ±5.822   x100
    disruptek/frosty .................. 29.689 ms     30.109 ms    ±0.309   x100
    treeform/jsony .................... 60.054 ms     62.637 ms    ±0.616   x100
    
    
    Run

<https://github.com/treeform/flatty>

If a library fails to work try another one... if my library fails to work open 
a issue on github.

Reply via email to