fix types when creating/parsing json