Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to-JSON-dumping for non-JSON data types #3

Open
jsteemann opened this issue Nov 20, 2015 · 1 comment
Open

Add to-JSON-dumping for non-JSON data types #3

jsteemann opened this issue Nov 20, 2015 · 1 comment

Comments

@jsteemann
Copy link
Contributor

Data types that have no equivalent in JSON should be convertible to JSON using a configurable mechanism.
The obvious conversions mechanisms that we should provide by default are:

  • conversion of non-JSON data types to null
  • throwing an exception if an incompatible data type is encountered
  • custom conversion:
    • binary to base64 or something similar
    • UTCDate to integer

All of this should be configurable via options for the Dumper.

@CoDEmanX
Copy link

CoDEmanX commented Dec 1, 2015

date.toISOString() can also be desired for date objects. References and especially circular dependencies are probably best dealt with by substitution with null, although some special syntax could be introduced to later recover the inter references.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants