Beispiel #1
0
        public static Trading.OrderLive ParseOrderLive(string text)
        {
            System.Text.Json.JsonParser parser = new System.Text.Json.JsonParser();
            OrderLive order = parser.Parse <OrderLive>(text);

            return(order);
        }
Beispiel #2
0
 public static IDictionary <string, PoloniexAPI.WalletTools.IBalance> ParseBalances(string text)
 {
     try {
         System.Text.Json.JsonParser      parser = new System.Text.Json.JsonParser();
         KeyValuePair <string, Balance>[] data   = parser.Parse <Dictionary <string, Balance> >(text).ToArray();
         IDictionary <string, PoloniexAPI.WalletTools.IBalance> returnData = new Dictionary <string, PoloniexAPI.WalletTools.IBalance>();
         for (int i = 0; i < data.Length; i++)
         {
             returnData.Add(new KeyValuePair <string, PoloniexAPI.WalletTools.IBalance>(data[i].Key, (PoloniexAPI.WalletTools.Balance)data[i].Value));
         }
         return(returnData);
     }
     catch (Exception e) {
         Console.WriteLine("JSON Parser, line 22");
         Console.WriteLine(e.Message);
         return(null);
     }
 }
 public static JsonObject Parse(ReadOnlySpan<byte> utf8Json, BufferPool pool = null)
 {
     var parser = new JsonParser();
     var result = parser.Parse(utf8Json, pool);
     return result;
 }
 public static JsonObject Parse(ReadOnlySpan<byte> utf8Json)
 {
     var parser = new JsonParser();
     var result = parser.Parse(utf8Json);
     return result;
 }