jsonToLon function

String jsonToLon(
  1. String source, {
  2. bool useTables = true,
  3. int maxDepth = 512,
  4. int maxExpandedElements = 1000000,
  5. int maxInputCodeUnits = 64 * 1024 * 1024,
  6. int maxOutputCodeUnits = 64 * 1024 * 1024,
})

Converts JSON text to canonical Language Object Notation.

Implementation

String jsonToLon(
  String source, {
  bool useTables = true,
  int maxDepth = 512,
  int maxExpandedElements = 1000000,
  int maxInputCodeUnits = 64 * 1024 * 1024,
  int maxOutputCodeUnits = 64 * 1024 * 1024,
}) =>
    LonCodec(
      useTables: useTables,
      maxDepth: maxDepth,
      maxExpandedElements: maxExpandedElements,
      maxInputCodeUnits: maxInputCodeUnits,
      maxOutputCodeUnits: maxOutputCodeUnits,
    ).encodeJson(source);