• My Pages
  • Comments
  • Add Link
  • Subscribe
  • Subscribe User
  • Edit (GUI)
  • Edit (Text)
  • Rename Page
  • Copy Page
  • Load Page
  • Save Page
  • Delete Page
  • Attachments
  • Check Spelling
  • Diffs
  • Info
  • Revert to this revision
  • XML
  • Render as Docbook
  • Print View
  • Raw Text
  • Delete Cache
  • Like Pages
  • Local Site Map
  • Remove Spam
  • Package Pages
  • Sync Pages

    Revision 1 as of 2015-02-08 05:26:36

    Clear message

    JSON (JavaScript Object Notation) is a simple data-interchange format. Meaning it is an easy to use method to interchange data.

    Contents

    1. JSON Object

    JSON Object

    Usage:

    ObjName = {Element1:Value1, Element2:Value2}

    Example:

    PlayerDetails = {Owner:"NEAT", Group:1}
    echo "Player {PlayerDetails.Owner} is in group {PlayerDetails.Group}"

    This method allows you to create and define a JSON Object and its elements. A JSON object is defined between braces {}. Within the braces you can define the elements of the objects well as the value of that element.

    • NameOfJSONObject = { ElementName:"Value" }

    If you wanted to echo the above "Value" that was given to the element called "ElementName", You can do this:

    • echo NameOfJSONObject.ElementName

    The result of this would be:

    •  (City Name) - Value
       (City Name) - Script stopped


    CategoryFunctions