public static string Convert(string[] header, string[] record, string[] stringProperties = null) { var obj = CsvUtility.CreateObject(header, record, stringProperties) as IDictionary <string, object>; var json = JsonConvert.SerializeObject(obj); var jsonPretty = JsonUtility.JsonPrettify(json); return(jsonPretty); }
public static string Convert(string[] header, string[] record, string[] stringProperties = null) { var obj = CsvUtility.CreateObject(header, record, stringProperties) as IDictionary <string, object>; var bson = obj.ToBsonDocument(); var json = bson.ToJson(); var jsonPretty = ReplaceISODate(JsonUtility.JsonPrettify(StripISODate(json))); return(jsonPretty); }