Json Node Lexer

  • JNL Beginner

    JSON (JavaScript Object Notation) is a language independent ASCII data-interchange format based on a subset of the JavaScript Programming Language, that is easy for humans to read and write, and easy for computers to parse and generate.

    JSON is built on three universal structures supported by most modern programming languages:

    1. Name-Data Pair: Set of two linked data items in which the Name is a unique identifier for the item of Data. Aliases: Key-Value Pair. A value can be a string in double quotes, or a number, or true or false or null, or an object or an array. 
    2. Object:  A unordered collection of Name-Data pairs. Aliases: Record, Struct, Dictionary, Hash table, Keyed list, or Associative array. An object begins with { (left brace) and ends with } (right brace). Each name is followed by : (colon) and the name-value pairs are separated by , (comma).
    3. Array: An ordered list of values. Aliases: Vector, List, or Sequence. An array begins with [ (left bracket) and ends with ] (right bracket). Values are separated by , (comma).

    These structures can be nested,  arranged in a hierarchy and serialized into a single piece of data.  All of these properties are makes JSON ideal for data-interchange internally and externally to a computer program.

Json Node Lexer

JNL Hierarchical Ordered Encoding/Decoding

The concept behind Hierarchical Ordered Encoding/Decoding is to decode in the order you encode. It assumes, one has prior knowledge of the hierarchy of objects, members, arrays, pairs.

Having prior knowledge of the hierarchical order allows you to use the hierarchy itself to describe how the data is used, providing some interesting properties of compression and obfuscation by reducing or omitting Keynames.  Keynames can also be used with:

1. Arbitrary names
2. Single word, number, symbol for all Keys
3. Empty Strings (Blank) for all Keys
4. Digits to represent location in the hierarchy. Note: Using large number radix (base) such as hexadecimal (Sixteen) or Base 36 (0-9,A-Z) can reduce the number of characters in the digit.

JNL’s Codec Functions are designed to 

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Pin It on Pinterest