You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using System;
- using SUISS.Cloud.Boomlagoon.JSON;
-
- namespace SUISS.Cloud
- {
- public class ApiResponse
- {
- public ApiResponse(object data)
- {
- this.Json = data;
- }
-
- public JSONValue Data
- {
- get
- {
- string text = SUISS.Cloud.Json.Encode(this.Json);
- text = text.Trim();
- if (!text.StartsWith("{") && !text.StartsWith("["))
- {
- return null;
- }
- if (text.StartsWith("{"))
- {
- JSONObject jsonobject = JSONObject.Parse(text);
- if (jsonobject == null)
- {
- return null;
- }
- return new JSONValue(jsonobject);
- }
- else
- {
- JSONObject jsonobject2 = JSONObject.Parse("{\"data\":" + text + "}");
- if (jsonobject2 == null)
- {
- return null;
- }
- return jsonobject2.GetValue("data");
- }
- }
- }
-
- public object Json { get; private set; }
- }
- }
|