Versions Compared


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


Code Block
LabelHandle = SRP_Json(ObjectHandle, "Get", "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
    "" : "John"
    ""  : "Doe"

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

// CORRECT: This will get you ""
Handle = SRP_Json(ObjectHandle, "Get", "")

This service always returns a JSON Entity Handle. If you know the descendant will be a String, Number, or Boolean type entity, you might prefer to use GetValue instead, which gets the value instead of the handle.