Comments (2)
@crazytaxi824 按照 JSON 标准,/ 是需要转义的,具体可以参考以下标准书的第九章:9 String
https://www.ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf
也可以参考 json.org 的首页上关于需要转义的字符的图:
所以,从 Marshal 的角度,jsonvalue 的处理方法是没错的。
不过你这一说确实让我发现了,encoding/json 并没有按照 json 标准的要求去转义;同时,encoding/json 也支持两种转义方式,我后面也改成支持两种模式吧,改好了之后我会更新一下这个 issue 的状态~~
from go.jsonvalue.
@crazytaxi824 我确认了一下,目前 jsonvalue 在 unmarshal 的时候就已经是支持 "/" 和 "/" 两种转义方式的。那我把这个 issue close 了吧
from go.jsonvalue.
Related Issues (20)
- 当 *V 是一个 NaN 或 +/-Inf 值时,v.String() 返回空
- 序列化的时候 "&" 会变成 "u0026" HOT 8
- 字符串中汉字与网址问题 HOT 5
- 不支持范型array就是鸡肋,没什么用的库(已回复) HOT 3
- 正则作为value时的解析 HOT 1
- 可否增加一个字段描述object的key类型 HOT 5
- 没有正确区分 float32 和 float64 HOT 1
- 注释、文档例程和实际代码有些出入 HOT 2
- 当处理指针 struct 中的 array 时,nil pointer dereference
- I suggest that the Chinese notes in the project should be changed to English ones. HOT 1
- I suggest that the Chinese notes in the project should be changed to English ones. HOT 3
- Panic when proceeding anonymous struct pointer HOT 1
- time.Time marshaling not supported HOT 1
- support json.Marshaler / json.Marshaler and encoding.TextMarshaler / encoding.TextUnmarshaler HOT 1
- 能否支持全局默认Option的修改? HOT 2
- I get a data race at `internalLoadPredictSizePerValue` HOT 10
- MustGet("key").Int()异常 HOT 3
- 请问下:将string或[]byte反序列化成jsonvalue.*V对象时,如何保证key的顺序和原始json串的顺序一样呢 HOT 4
- 在 struct 中嵌套 jsonvalue.V 之后,json.Marshal 时指定 option 不生效 HOT 1
- Boolean value support HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go.jsonvalue.