Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
Label = SRP_Json(ObjectHandle, "GetValue", "menu.items[2].label")

Important. The Path parameter is a convenient way to drill into a JSON document. It reserves five characters: period, left square bracket, right square bracket, left angle bracket, and right angle bracket. If the member you want to access uses one of these characters, you must escape them by doubling up. Here's an example of a JSON document with periods in the member names and how to access them.

Code Block
{
    "first.name" : "John"
    "last.name"  : "Doe"
}


// INCORRECT: This will get you "" because it will try to get "first" and then "name"
Name = SRP_Json(ObjectHandle, "GetValue", "first.name")


// CORRECT: This will get you "first.name"
Name = SRP_Json(ObjectHandle, "GetValue", "first..name")


Note
This service always returns JSON Strings or values. If you want to get the JSON Entity Handle, you need to use Get instead.

...