code: func PeekBytesAsJSON(b []byte) (n int, err error) {
  	if len(b) <= 0 {
  		err = errors.New("Cant peek from empty bytes")
  		return
  	}
  	switch c := TypeCode(b[0]); c {
  	case TypeCodeObject, TypeCodeArray:
  		if len(b) >= valTypeSize+headerSize {
  			size := endian.Uint32(b[valTypeSize+dataSizeOff:])
  			n = valTypeSize + int(size)
  			return
  		}
  	case TypeCodeString:
  		strLen, lenLen := binary.Uvarint(b[valTypeSize:])
  		return valTypeSize + int(strLen) + lenLen, nil
  	case TypeCodeInt64, TypeCodeUint64, TypeCodeFloat64:
  		n = valTypeSize + 8
  		return
  	case TypeCodeLiteral:
  		n = valTypeSize + 1
  		return
  	}
  	err = errors.New("Invalid JSON bytes")
  	return
  }
docs: // PeekBytesAsJSON trys to peek some bytes from b, until
  // we can deserialize a JSON from those bytes.