@@ -524,7 +524,7 @@ static size_t serialize_string (json_char * buf,
524524 return buf - orig_buf ;
525525}
526526
527- size_t json_measure (json_value * value )
527+ size_t json_measure (const json_value * value )
528528{
529529 return json_measure_ex (value , default_opts );
530530}
@@ -534,7 +534,7 @@ size_t json_measure (json_value * value)
534534 indents += depth; \
535535} while(0); \
536536
537- size_t json_measure_ex (json_value * value , json_serialize_opts opts )
537+ size_t json_measure_ex (const json_value * value , json_serialize_opts opts )
538538{
539539 size_t total = 1 ; /* null terminator */
540540 size_t newlines = 0 ;
@@ -702,7 +702,7 @@ size_t json_measure_ex (json_value * value, json_serialize_opts opts)
702702 return total ;
703703}
704704
705- void json_serialize (json_char * buf , json_value * value )
705+ void json_serialize (json_char * buf , const json_value * value )
706706{
707707 json_serialize_ex (buf , value , default_opts );
708708}
@@ -729,7 +729,7 @@ void json_serialize (json_char * buf, json_value * value)
729729 *buf ++ = (c); \
730730} while(0); \
731731
732- void json_serialize_ex (json_char * buf , json_value * value , json_serialize_opts opts )
732+ void json_serialize_ex (json_char * buf , const json_value * value , json_serialize_opts opts )
733733{
734734 json_int_t integer , orig_integer ;
735735 json_object_entry * entry ;
0 commit comments