Giter VIP home page Giter VIP logo

Comments (2)

Andrew-M-C avatar Andrew-M-C commented on July 22, 2024

@crazytaxi824 按照 JSON 标准,/ 是需要转义的,具体可以参考以下标准书的第九章:9 String
https://www.ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf

也可以参考 json.org 的首页上关于需要转义的字符的图:
image

所以,从 Marshal 的角度,jsonvalue 的处理方法是没错的。

不过你这一说确实让我发现了,encoding/json 并没有按照 json 标准的要求去转义;同时,encoding/json 也支持两种转义方式,我后面也改成支持两种模式吧,改好了之后我会更新一下这个 issue 的状态~~

from go.jsonvalue.

Andrew-M-C avatar Andrew-M-C commented on July 22, 2024

@crazytaxi824 我确认了一下,目前 jsonvalue 在 unmarshal 的时候就已经是支持 "/" 和 "/" 两种转义方式的。那我把这个 issue close 了吧

from go.jsonvalue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.