velocypack icon indicating copy to clipboard operation
velocypack copied to clipboard

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

Open jsteemann opened this issue 10 years ago • 1 comments

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.

jsteemann avatar Nov 20 '15 11:11 jsteemann

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.

CoDEmanX avatar Dec 01 '15 17:12 CoDEmanX