public static IJsonObject BuildJsonObject(string json) { if (json.IsSurroundBy('{', '}')) { var builder = new JsonClassBuilder(); return builder.Build(json); } if (json.IsSurroundBy('[', ']')) { return new JsonArray(json); } if (json.IsSurroundBy('\"')) { return new StringJsonProperty(json); } return new NumericJsonProperty(json); }
public static IJsonObject BuildJsonObject(string json) { if (json.IsSurroundBy('{', '}')) { var builder = new JsonClassBuilder(); return(builder.Build(json)); } if (json.IsSurroundBy('[', ']')) { return(new JsonArray(json)); } if (json.IsSurroundBy('\"')) { return(new StringJsonProperty(json)); } return(new NumericJsonProperty(json)); }