Parser a string to get a primitive value. * If the first character after the value is different of '}' or ']' is set to '\0'. * @param str Pointer to first character. * @param property Property handler to set the value and the type, (true, false or null). * @param value String with the primitive literal. * @param type The code of the type. ( JSON_BOOLEAN or JSON_NULL ) * @retval Pointe
| 204 | * @retval Pointer to first non white space after the string. If success. |
| 205 | * @retval Null pointer if any error occur. */ |
| 206 | static char* primitiveValue( char* ptr, json_t* property, char const* value, jsonType_t type ) { |
| 207 | ptr = checkStr( ptr, value ); |
| 208 | if ( !ptr || !isEndOfPrimitive( *ptr ) ) return 0; |
| 209 | ptr = setToNull( ptr ); |
| 210 | property->type = type; |
| 211 | return ptr; |
| 212 | } |
| 213 | |
| 214 | /** Parser a string to get a true value. |
| 215 | * If the first character after the value is different of '}' or ']' is set to '\0'. |
no test coverage detected