fixed data serialization for json