mirage / ezjsonm

An easy interface on top of the Jsonm library.
Other
40 stars 22 forks source link

Add `value_to_*` and `value_from_*` methods to support RFC 7159/ECMA-404 #34

Closed jaredly closed 5 years ago

jaredly commented 5 years ago

See #5 for a past discussion of this.

Jsonm as of v1.0.0 supports RFC 7159/ECMA-404, so this library can too!

Test Plan: dune runtest

The tests have been updated to use the underlying value_to_string and value_from_string where appropriate, so they are fully tested.

hcarty commented 5 years ago

Very nice!

Is there still a need to keep the t vs value distinction at this point? It would probably be a breaking change, but it would be nice to have the simplicity of a single type to work with.

jaredly commented 5 years ago

I'd be fine with that, but I wanted to be conservative in my PR

hcarty commented 5 years ago

Agreed! I think this is a good step. Merging the types could be part of a larger 2.x plan.

avsm commented 5 years ago

Thanks for this! I've merged it and released it as v1.1.0. I agree that the breaking change of merging the value functions can wait for a major bump.