expr-lang/expr

Double escaping pair node key

aizeNR opened this issue · 0 comments

Hi, in commit add escaping pair node key, but str.String() already uses this and it causes double escaping.

Example https://go.dev/play/p/WTkUxu5yM4e

package main

import (
	"fmt"

	"github.com/expr-lang/expr/parser"
)

func main() {
	tree, err := parser.Parse(`{"9": 10}`)
	if err != nil {
		fmt.Print(err.Error())
		return
	}

	fmt.Print(tree.Node.String())
}