Skip to content

v0.2.0

Choose a tag to compare

@davidesantangelo davidesantangelo released this 19 Nov 11:05
· 6 commits to master since this release

Added

  • CLI Tool: New bin/cton executable for converting between JSON and CTON from the command line. Supports auto-detection, pretty printing, and file I/O.
  • Streaming IO: Cton.dump now accepts an IO object as the second argument (or via io: keyword), allowing direct writing to files or sockets without intermediate string allocation.
  • Pretty Printing: Added pretty: true option to Cton.dump to format output with indentation and newlines for better readability.
  • Extended Types: Native support for Time, Date (ISO8601), Set (as Array), and OpenStruct (as Object).
  • Enhanced Error Reporting: ParseError now includes line and column numbers to help locate syntax errors in large documents.

Changed

  • Ruby 3 Compatibility: Improved argument handling in Cton.dump to robustly support Ruby 3 keyword arguments when passing hashes.