コード例 #1
0
 /// <summary>
 /// Gets an instance of <var>JsonObject</var> from the specified JSON string.
 /// </summary>
 /// <param name="json">The JSON string representation of the object.</param>
 /// <param name="func">The function used to parse the object.</param>
 public static T ParseJson <T>(string json, Func <JsonObject, T> func)
 {
     return(JsonConverter.ParseObject(json, func));
 }
コード例 #2
0
 /// <summary>
 /// Gets an instance of <var>JsonObject</var> from the specified JSON string.
 /// </summary>
 /// <param name="json">The JSON string representation of the object.</param>
 public static JsonObject ParseJson(string json)
 {
     return(JsonConverter.ParseObject(json));
 }
コード例 #3
0
 /// <summary>
 /// Load an instance of <var>JsonObject</var> from the JSON file at the specified <var>path</var>.
 /// </summary>
 /// <param name="path">The path to the file.</param>
 public static JsonObject LoadJson(string path)
 {
     return(JsonConverter.ParseObject(File.ReadAllText(path)));
 }
コード例 #4
0
 /// <summary>
 /// Load an instance of <var>T</var> from the JSON file at the specified <var>path</var>.
 /// </summary>
 /// <param name="path">The path to the file.</param>
 /// <param name="func">The function used to parse the object.</param>
 public static T LoadJson <T>(string path, Func <JsonObject, T> func)
 {
     return(JsonConverter.ParseObject(File.ReadAllText(path), func));
 }
コード例 #5
0
 /// <summary>
 /// Gets an instance of <var>InstagramRecentMediaResponse</var> from
 /// the specified JSON string.
 /// </summary>
 /// <param name="json">The JSON string representation of the object.</param>
 public static InstagramRecentMediaResponse ParseJson(string json)
 {
     return(JsonConverter.ParseObject(json, Parse));
 }