Exemple #1
0
        public static object Decode(byte[] buffer, IList <string> initialDictionary = null, PsonOptions options = PsonOptions.None, int allocationLimit = -1)
        {
            var input = new MemoryStream(buffer);

            using (var decoder = new PsonDecoder(input, initialDictionary, options, allocationLimit))
                return(decoder.Read());
        }
Exemple #2
0
        public static object Decode(byte[] buffer, out JsonNode root, out String stringify, IList <string> initialDictionary = null, PsonOptions options = PsonOptions.None, int allocationLimit = -1)
        {
            var input = new MemoryStream(buffer);

            using (var decoder = new PsonDecoder(input, initialDictionary, options, allocationLimit))
            {
                Object retVal = decoder.Read(out root);
                stringify = decoder.jsonTxt.ToString();
                return(retVal);
            }
        }