Apparently the JSON parser uses this same serialization method under the hood to create objects from JSON.