jsonReadInt

Reads an integer value from a JSON object by key. Takes json string and key string. Returns integer value, or 0 if key not found.

JSON

Parameters & Returns

Parameters

json String
key String

Returns

Int

Quick Summary

Reads an integer value from a JSON object by key. Takes json string and key string. Returns integer value, or 0 if key not found.

Technical Exegesis...

Reads an integer value from a JSON object by key. Takes json string and key string. Calls FindKeyPosition helper to search for "\"key\":" pattern. FindKeyPosition returns position after colon, skipping whitespace. If key not found, returns 0. If found, calls atoi to parse integer from json+pos. Returns integer value, or 0 if key not found.

This function deserializes integer from JSON string. FindKeyPosition searches for exact key match with quotes.

Example

Example.bam
; No example implemented yet