Changeset 74027 in vbox for trunk/include/iprt
- Timestamp:
- Sep 2, 2018 2:49:45 PM (6 years ago)
- Location:
- trunk/include/iprt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/json.h
r73978 r74027 51 51 /** Value containing a string. */ 52 52 RTJSONVALTYPE_STRING, 53 /** Value containg a number. */ 53 /** Value containg an integer number. */ 54 RTJSONVALTYPE_INTEGER, 55 /** Value containg an floating point number. */ 54 56 RTJSONVALTYPE_NUMBER, 55 57 /** Value containg the special null value. */ … … 172 174 173 175 /** 174 * Returns the number from a given JSON number value.176 * Returns the integer from a given JSON integer value. 175 177 * 176 178 * @returns IPRT status code. … … 178 180 * @param hJsonVal The JSON value handle. 179 181 * @param pi64Num WHere to store the number on success. 180 * 181 * @note This JSON implementation does not implement support for floating point 182 * numbers currently. When it does, it will be in the form of a 183 * RTJsonValueQueryFloat method. 182 * @sa RTJsonValueQueryNumber 184 183 */ 185 184 RTDECL(int) RTJsonValueQueryInteger(RTJSONVAL hJsonVal, int64_t *pi64Num); 186 185 187 186 /** 187 * Returns the floating point value from a given JSON number value. 188 * 189 * @returns IPRT status code. 190 * @retval VERR_JSON_VALUE_INVALID_TYPE if the JSON value is not a number. 191 * @param hJsonVal The JSON value handle. 192 * @param prdNum WHere to store the floating point number on success. 193 * @sa RTJsonValueQueryInteger 194 */ 195 RTDECL(int) RTJsonValueQueryNumber(RTJSONVAL hJsonVal, double *prdNum); 196 197 /** 188 198 * Returns the value associated with a given name for the given JSON object value. 189 199 * … … 196 206 */ 197 207 RTDECL(int) RTJsonValueQueryByName(RTJSONVAL hJsonVal, const char *pszName, PRTJSONVAL phJsonVal); 208 209 /** 210 * Returns the number of a number value associated with a given name for the given JSON object value. 211 * 212 * @returns IPRT status code. 213 * @retval VERR_JSON_VALUE_INVALID_TYPE if the JSON value is not an object or 214 * the name does not point to an integer value. 215 * @retval VERR_NOT_FOUND if the name is not known for this JSON object. 216 * @param hJsonVal The JSON value handle. 217 * @param pszName The member name of the object. 218 * @param pi64Num Where to store the number on success. 219 */ 220 RTDECL(int) RTJsonValueQueryIntegerByName(RTJSONVAL hJsonVal, const char *pszName, int64_t *pi64Num); 198 221 199 222 /** … … 206 229 * @param hJsonVal The JSON value handle. 207 230 * @param pszName The member name of the object. 208 * @param p i64Num Where to store thenumber on success.209 */ 210 RTDECL(int) RTJsonValueQuery IntegerByName(RTJSONVAL hJsonVal, const char *pszName, int64_t *pi64Num);231 * @param prdNum WHere to store the floating point number on success. 232 */ 233 RTDECL(int) RTJsonValueQueryNumberByName(RTJSONVAL hJsonVal, const char *pszName, double *prdNum); 211 234 212 235 /** -
trunk/include/iprt/mangling.h
r73956 r74027 1119 1119 # define RTJsonValueQueryInteger RT_MANGLER(RTJsonValueQueryInteger) 1120 1120 # define RTJsonValueQueryIntegerByName RT_MANGLER(RTJsonValueQueryIntegerByName) 1121 # define RTJsonValueQueryNumber RT_MANGLER(RTJsonValueQueryNumber) 1122 # define RTJsonValueQueryNumberByName RT_MANGLER(RTJsonValueQueryNumberByName) 1121 1123 # define RTJsonValueQueryString RT_MANGLER(RTJsonValueQueryString) 1122 1124 # define RTJsonValueQueryStringByName RT_MANGLER(RTJsonValueQueryStringByName)
Note:
See TracChangeset
for help on using the changeset viewer.