@@ -523,7 +523,7 @@ static size_t serialize_string (json_char * buf,
523523 return buf - orig_buf ;
524524}
525525
526- size_t json_measure (json_value * value )
526+ size_t json_measure (const json_value * value )
527527{
528528 return json_measure_ex (value , default_opts );
529529}
@@ -533,7 +533,7 @@ size_t json_measure (json_value * value)
533533 indents += depth; \
534534} while(0); \
535535
536- size_t json_measure_ex (json_value * value , json_serialize_opts opts )
536+ size_t json_measure_ex (const json_value * value , json_serialize_opts opts )
537537{
538538 size_t total = 1 ; /* null terminator */
539539 size_t newlines = 0 ;
@@ -701,7 +701,7 @@ size_t json_measure_ex (json_value * value, json_serialize_opts opts)
701701 return total ;
702702}
703703
704- void json_serialize (json_char * buf , json_value * value )
704+ void json_serialize (json_char * buf , const json_value * value )
705705{
706706 json_serialize_ex (buf , value , default_opts );
707707}
@@ -728,7 +728,7 @@ void json_serialize (json_char * buf, json_value * value)
728728 *buf ++ = (c); \
729729} while(0); \
730730
731- void json_serialize_ex (json_char * buf , json_value * value , json_serialize_opts opts )
731+ void json_serialize_ex (json_char * buf , const json_value * value , json_serialize_opts opts )
732732{
733733 json_int_t integer , orig_integer ;
734734 json_object_entry * entry ;
0 commit comments