Refactor dump function identifier.

This commit is contained in:
rafagafe 2017-04-03 02:42:52 +02:00
parent e11cf572ef
commit 2a9f5ccd75

View File

@ -48,7 +48,7 @@ static char const* getJsonTypeName( jsonType_t type ) {
/** Print the value os a json object or array.
* @param json The handler of the json object or array. */
static void print( json_t const* json ) {
static void dump( json_t const* json ) {
jsonType_t const type = json_getType( json );
if ( type != JSON_OBJ && type != JSON_ARRAY ) {
@ -66,7 +66,7 @@ static void print( json_t const* json ) {
if ( name ) printf(" \"%s\": ", name );
if ( propertyType == JSON_OBJ || propertyType == JSON_ARRAY )
print( child );
dump( child );
else {
char const* value = json_getValue( child );
@ -109,6 +109,6 @@ int main( void ) {
return EXIT_FAILURE;
}
puts("Print JSON:");
print( json );
dump( json );
return EXIT_SUCCESS;
}