1package json23import (4 "bytes"5)67const (8 unescapeStackBufSize = 649 absMinInt64 = 1 << 6310 maxInt64 = absMinInt64 - 111 maxUint64 = 1<<64 - 112)1314// PaseStringLiteral parses a string from the given byte slice.15func ParseStringLiteral(data []byte) (string, error) {16 var buf [unescapeStackBufSize]byte1718 bf, err := Unescape(data, buf[:])19 if err != nil {20 return "", errInvalidStringInput21 }2223 return string(bf), nil24}2526// ParseBoolLiteral parses a boolean value from the given byte slice.27func ParseBoolLiteral(data []byte) (bool, error) {28 switch {29 case bytes.Equal(data, trueLiteral):30 return true, nil31 case bytes.Equal(data, falseLiteral):32 return false, nil33 default:34 return false, errMalformedBooleanValue35 }36}37Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.