Lines Matching full:json
75 # JSON content.
84 # Internal helper function to append items to a list in the JSON content.
88 string(JSON subjson GET "${json_content}" ${key})
91 # yaml_load() are proper JSON arrays. When an append is requested, those
93 string(JSON type TYPE "${json_content}" ${key})
95 string(JSON arraylength LENGTH "${subjson}")
107 string(JSON item GET "${json_content}" ${key} ${i})
113 string(JSON json_content SET "${json_content}" ${key} "\"${subjson}\"")
115 # lists are stored as JSON arrays
116 string(JSON index LENGTH "${subjson}")
151 string(JSON json_content SET "${json_content}" ${key} ${i} "{${qouted_map_value}}")
158 string(JSON json_content SET "${json_content}" ${key} ${i} "\"${value}\"")
220 zephyr_set(JSON "{}" SCOPE ${ARG_YAML_NAME})
244 "import json; import yaml; print(json.dumps(yaml.safe_load(open('${ARG_YAML_FILE}')) or {}))"
257 zephyr_set(JSON "${json_load_out}" SCOPE ${ARG_YAML_NAME})
274 # - Anything will be returned, even json object strings.
280 zephyr_get_scoped(json_content ${ARG_YAML_NAME} JSON)
284 string(JSON type ERROR_VARIABLE error TYPE "${json_content}" ${ARG_YAML_KEY})
286 string(JSON subjson GET "${json_content}" ${ARG_YAML_KEY})
287 string(JSON arraylength LENGTH "${subjson}")
292 string(JSON item GET "${subjson}" ${i})
300 string(JSON value ERROR_VARIABLE error GET "${json_content}" ${ARG_YAML_KEY})
321 zephyr_get_scoped(json_content ${ARG_YAML_NAME} JSON)
323 string(JSON type ERROR_VARIABLE error TYPE "${json_content}" ${ARG_YAML_KEY})
325 string(JSON subjson GET "${json_content}" ${ARG_YAML_KEY})
326 string(JSON arraylength LENGTH "${subjson}")
387 zephyr_get_scoped(json_content ${ARG_YAML_NAME} JSON)
395 string(JSON type ERROR_VARIABLE ignore TYPE "${json_content}" ${valid_keys} ${k})
415 string(JSON json_content SET "${json_content}"
423 string(JSON json_content SET "${json_content}" ${ARG_YAML_KEY} "${json_string}")
429 string(JSON json_content SET "${json_content}" ${ARG_YAML_KEY} "\"${escape_value}\"")
432 zephyr_set(JSON "${json_content}" SCOPE ${ARG_YAML_NAME})
454 zephyr_get_scoped(json_content ${ARG_YAML_NAME} JSON)
455 string(JSON json_content REMOVE "${json_content}" ${ARG_YAML_KEY})
457 zephyr_set(JSON "${json_content}" SCOPE ${ARG_YAML_NAME})
493 zephyr_get_scoped(json_content ${ARG_YAML_NAME} JSON)
532 set(json_file ${yaml_file_no_ext}_${genex_save_count}.json)
535 # comment this to keep the temporary JSON files
545 zephyr_string(ESCAPE json "${in_json}")
551 string(JSON length LENGTH "${json}")
559 string(JSON member MEMBER "${json}" ${i})
561 string(JSON type TYPE "${json}" ${member})
562 string(JSON subjson GET "${json}" ${member})
564 # JSON object -> YAML dictionary
569 # JSON array -> YAML list
571 string(JSON arraylength LENGTH "${subjson}")
578 string(JSON item GET "${json}" ${member} ${i})
581 string(JSON length ERROR_VARIABLE ignore LENGTH "${item}")
594 # JSON string maps to multiple YAML types:
619 # Other JSON data type -> YAML scalar, as-is