Which sample is a valid Expected Output JSON for sending current weather data to an OmniScriptCard Layout?

Study for the OmniStudio Developer Test. Focus with flashcards and multiple-choice questions, each with hints and explanations. Get ready for your exam!

Multiple Choice

Which sample is a valid Expected Output JSON for sending current weather data to an OmniScriptCard Layout?

Explanation:
The concept being tested is using a nested JSON structure that the OmniScriptCard Layout expects, with a top-level object named Current that contains the weather fields. The card reads values as Current.TempF, Current.CityState, and Current.TempC, so grouping these under a Current object ensures the data is accessible in the layout. The valid example places TempF, CityState, and TempC inside a single Current object, which matches the data model the card binds to and avoids any ambiguity from flattened keys or duplicate entries. Other options fail because they don’t provide the required nested Current object. Flattened keys like Current:TempF don’t map cleanly to the layout’s bindings, duplicate keys (such as two TempF fields) introduce ambiguity, and an XML-like <root> structure isn’t JSON at all.

The concept being tested is using a nested JSON structure that the OmniScriptCard Layout expects, with a top-level object named Current that contains the weather fields. The card reads values as Current.TempF, Current.CityState, and Current.TempC, so grouping these under a Current object ensures the data is accessible in the layout.

The valid example places TempF, CityState, and TempC inside a single Current object, which matches the data model the card binds to and avoids any ambiguity from flattened keys or duplicate entries.

Other options fail because they don’t provide the required nested Current object. Flattened keys like Current:TempF don’t map cleanly to the layout’s bindings, duplicate keys (such as two TempF fields) introduce ambiguity, and an XML-like structure isn’t JSON at all.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy