Fix to_string to json dump without spaces