Lines Matching defs:object
158 struct spdk_json_val object[] = {
184 /* Passing Test: object containing simple types */
185 CU_ASSERT(spdk_json_decode_object(object, decoders, 4, &output) == 0);
193 CU_ASSERT(spdk_json_decode_object(object, decoders, 2, &output) != 0);
198 CU_ASSERT(spdk_json_decode_object(object, decoders, 4, &output) != 0);
204 object[3].start = "first";
205 object[3].len = 5;
206 CU_ASSERT(spdk_json_decode_object(object, decoders, 3, &output) != 0);
209 object[3].start = "second";
210 object[3].len = 6;
213 object[2].start = "HELO";
214 CU_ASSERT(spdk_json_decode_object(object, decoders, 3, &output) != 0);
217 object[2].start = "HELLO";
219 /* Failing Test: not an object */
220 object[0].type = SPDK_JSON_VAL_ARRAY_BEGIN;
221 CU_ASSERT(spdk_json_decode_object(object, decoders, 3, &output) != 0);
817 " \"object\": { "
849 rc = spdk_json_find(values, "object", &key, &val, SPDK_JSON_VAL_OBJECT_BEGIN);
852 CU_ASSERT(key != NULL && spdk_json_strequal(key, "object") == true);
854 /* Find key in "object" by passing SPDK_JSON_VAL_ANY to match any type */
861 /* Find the "array" key in "object" by passing SPDK_JSON_VAL_ARRAY_BEGIN to match only array */
899 * but spdk_json_find can only be used for finding keys in an object. So this
931 /* Iterate over object keys. JSON spec doesn't guarantee order of keys in object but
939 CU_ASSERT(spdk_json_strequal(object_key, "object") == true);
974 /* Iterate over array in root object */