HTT Documentation

htt.json

  • Fnloads(string) → any

    Deserialize `str` to a Lua value, converting values like so:

    *----------------*---------------------* | JSON | Lua | *----------------*---------------------* | object | table (associative) | | array | table (list) | | string | string | | number (int) | integer | | number (float) | number | | true | boolean | | false | boolean | | null | nil | *----------------*---------------------*

    Parameters
    • str: string
      • a string of JSON
    Returns
    • any
      • a Lua data-structure reflecting the deserialized JSON
  • Fndumps(any) → string

    Serialize `obj` to a JSON-formatted string.

    See the table in `loads` for information on how values are converted.

    Parameters
    • obj: any
      • some Lua data-structure
    Returns
    • string
      • a JSON-formatted string representing `obj`.