@@ -153,7 +153,7 @@ static RdbRes toJsonDbSize(RdbParser *p, void *userData, uint64_t db_size, uint6
153
153
}
154
154
155
155
/* output json part */
156
- fprintf (ctx -> outfile , " \"__dbsize__ \": {\n" );
156
+ fprintf (ctx -> outfile , " \"%sdbsize__ \": {\n" , jsonMetaPrefix ); /* group dbsize with {..} */
157
157
fprintf (ctx -> outfile , " \"size\": %" PRIu64 ",\n" , db_size );
158
158
fprintf (ctx -> outfile , " \"expires\": %" PRIu64 "\n" , exp_size );
159
159
fprintf (ctx -> outfile , " }%s\n" , (db_size ) ? "," : "" );
@@ -171,7 +171,7 @@ static RdbRes toJsonSlotInfo(RdbParser *p, void *userData, RdbSlotInfo *info) {
171
171
}
172
172
173
173
/* output json part */
174
- fprintf (ctx -> outfile , " \"__slotinfo__ \": {\n" );
174
+ fprintf (ctx -> outfile , " \"%sslotinfo__ \": {\n" , jsonMetaPrefix );
175
175
fprintf (ctx -> outfile , " \"slotId\": %lu,\n" , info -> slot_id );
176
176
fprintf (ctx -> outfile , " \"slotSize\": %lu,\n" , info -> slot_size );
177
177
fprintf (ctx -> outfile , " \"slotSExpiresSize\": %lu\n" , info -> expires_slot_size );
@@ -184,7 +184,7 @@ static RdbRes toJsonAuxField(RdbParser *p, void *userData, RdbBulk auxkey, RdbBu
184
184
185
185
if (ctx -> state == R2J_IDLE ) {
186
186
ctx -> state = R2J_AUX_FIELDS ;
187
- fprintf (ctx -> outfile , "\"__aux__\" : {\n " ); /* group aux-fields with { ... } */
187
+ fprintf (ctx -> outfile , " \"%saux__\" : {\n" , jsonMetaPrefix ); /* group aux-fields with {.. } */
188
188
} else if (ctx -> state == R2J_AUX_FIELDS ) {
189
189
fprintf (ctx -> outfile , ",\n " );
190
190
} else {
@@ -500,9 +500,9 @@ static RdbRes toJsonFunction(RdbParser *p, void *userData, RdbBulk func) {
500
500
501
501
if (ctx -> state == R2J_IDLE ) {
502
502
ctx -> state = R2J_FUNCTIONS ;
503
- fprintf (ctx -> outfile , "\"__func__ \": {\n" );
503
+ fprintf (ctx -> outfile , "\"%sfunc__ \": {\n" , jsonMetaPrefix );
504
504
} else if (ctx -> state == R2J_AUX_FIELDS ) {
505
- fprintf (ctx -> outfile , "\n},\n \"__func__ \": {\n" );
505
+ fprintf (ctx -> outfile , "\n},\n \"%sfunc__ \": {\n" , jsonMetaPrefix );
506
506
ctx -> state = R2J_FUNCTIONS ;
507
507
} else if (ctx -> state == R2J_FUNCTIONS ) {
508
508
fprintf (ctx -> outfile , ",\n" );
0 commit comments