const correctness on json serialization