timo / json_fast

a naive imperative json parser in perl6, to evaluate performance against JSON::Tiny
Artistic License 2.0
27 stars 20 forks source link

jsonify Rational just like FatRat; jsonify other Real types via .Bridge #73

Closed japhb closed 3 years ago

japhb commented 3 years ago

Any Real not specifically handled on another path gets one more shot to successfully jsonify via .Bridge. This allows for instance Duration to encode as a Num and thus do approximately the right thing, within the limits of the JSON data model.

japhb commented 3 years ago

Ping?

lizmat commented 3 years ago

Sadly, I don't have write access. Also, maybe write some tests?

japhb commented 3 years ago

Updated with two new commits; one handles general Rationals as if they were FatRat; the other adds simple tests for the new behavior, as @lizmat requested.

@timo Can you take a look?

japhb commented 3 years ago

Ping? :-)