Lines Matching refs:data
31 static ssize_t parseInt32(const char *data, size_t numDigits, int32_t *out) { in parseInt32() argument
36 x += data[i] - '0'; in parseInt32()
38 CHECK(isdigit(data[i])); in parseInt32()
51 ssize_t JSONValue::Parse(const char *data, size_t size, JSONValue *out) { in Parse() argument
53 while (offset < size && isspace(data[offset])) { in Parse()
61 if (data[offset] == '[') { in Parse()
66 while (offset < size && isspace(data[offset])) { in Parse()
74 if (data[offset] == ']') { in Parse()
80 ssize_t n = Parse(&data[offset], size - offset, &val); in Parse()
90 while (offset < size && isspace(data[offset])) { in Parse()
98 if (data[offset] == ',') { in Parse()
100 } else if (data[offset] != ']') { in Parse()
108 } else if (data[offset] == '{') { in Parse()
113 while (offset < size && isspace(data[offset])) { in Parse()
121 if (data[offset] == '}') { in Parse()
127 ssize_t n = Parse(&data[offset], size - offset, &key); in Parse()
139 while (offset < size && isspace(data[offset])) { in Parse()
143 if (offset == size || data[offset] != ':') { in Parse()
150 n = Parse(&data[offset], size - offset, &val); in Parse()
163 while (offset < size && isspace(data[offset])) { in Parse()
171 if (data[offset] == ',') { in Parse()
173 } else if (data[offset] != '}') { in Parse()
181 } else if (data[offset] == '"') { in Parse()
189 switch (data[offset]) { in Parse()
193 c = data[offset]; in Parse()
218 } else if (data[offset] == '\\') { in Parse()
220 } else if (data[offset] == '"') { in Parse()
224 s.append(data[offset++]); in Parse()
235 } else if (isdigit(data[offset]) || data[offset] == '-') { in Parse()
237 if (data[offset] == '-') { in Parse()
247 while (offset < size && isdigit(data[offset])) { in Parse()
252 if (numDigits > 1 && data[firstDigitOffset] == '0') { in Parse()
260 if (offset < size && data[offset] == '.') { in Parse()
264 while (offset < size && isdigit(data[offset])) { in Parse()
278 if (offset < size && (data[offset] == 'e' || data[offset] == 'E')) { in Parse()
285 if (data[offset] == '+' || data[offset] == '-') { in Parse()
286 if (data[offset] == '-') { in Parse()
294 while (offset < size && isdigit(data[offset])) { in Parse()
306 if (parseInt32(&data[firstDigitOffset], numDigits, &x) != 0) { in Parse()
313 if (parseInt32(&data[firstDigitOffset], numDigits, &mantissa) != 0) { in Parse()
318 if (parseInt32(&data[firstFracDigitOffset], numFracDigits, &fraction) != 0) { in Parse()
323 if (parseInt32(&data[firstExpDigitOffset], numExpDigits, &exponent) != 0) { in Parse()
338 } else if (offset + 4 <= size && !strncmp("null", &data[offset], 4)) { in Parse()
341 } else if (offset + 4 <= size && !strncmp("true", &data[offset], 4)) { in Parse()
344 } else if (offset + 5 <= size && !strncmp("false", &data[offset], 5)) { in Parse()
626 sp<JSONCompound> JSONCompound::Parse(const char *data, size_t size) { in Parse() argument
628 ssize_t result = JSONValue::Parse(data, size, &value); in Parse()