Skip to content

Instantly share code, notes, and snippets.

@sergeant-wizard
Created September 22, 2014 07:05
Show Gist options
  • Save sergeant-wizard/cacd2c30bee503835dc9 to your computer and use it in GitHub Desktop.
Save sergeant-wizard/cacd2c30bee503835dc9 to your computer and use it in GitHub Desktop.
json memory usage
#include "dist/json/json.h"
int main(void){
Json::Reader reader;
Json::Value rootJson;
bool parseResult = reader.parse(" \
\"areas\" : [ \
{\
\"background_image\" : \"background_cave\",\
\"description\" : \"desc\",\
\"end_at\" : 1585699200,\
\"id\" : 1,\
\"name\" : \"チュートリアル\",\
\"prev_area_id\" : null,\
\"quests\" : [\
{\
\"id\" : 111,\
\"name\" : \"quest_1_1\",\
\"prev_quest_id\" : null\
},\
{\
\"id\" : 112,\
\"name\" : \"quest_1_2\",\
\"prev_quest_id\" : null\
},\
{\
\"id\" : 113,\
\"name\" : \"quest_1_3\",\
\"prev_quest_id\" : null\
}\
],\
\"start_at\" : 1396310400,\
\"wday\" : [],\
\"wday_end_at\" : 946771140,\
\"wday_start_at\" : 946684860\
}\
]\
", rootJson);
while (1){
;
}
return 0;
}
@sergeant-wizard
Copy link
Author

memory usage increase by 20KB when the json part is enabled

@csouls
Copy link

csouls commented Sep 22, 2014

100KB超えてないから気にしないことにしようかw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment