Ejemplo n.º 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());
        }
Ejemplo n.º 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);
            }
        }