toJson method

String toJson()

Convert to json object.

Implementation

String toJson() => switch (this) {
      string => 'STRING',
      number => 'NUMBER',
      integer => 'INTEGER',
      boolean => 'BOOLEAN',
      array => 'ARRAY',
      object => 'OBJECT',
    };