shamblett / cbor

A CBOR implementation for Dart
MIT License
36 stars 16 forks source link

(issue28) Json conversion #33

Closed nicbn closed 2 years ago

nicbn commented 2 years ago

Implements a JSON encoder, and toJson. Also separates the implementation for each type, in order to more cleanly hide internal methods.

Keys for a map are stringified if they are not strings, so if a key is for example 1, it turns into "1".