-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
切换 JSON 库 #378
Draft
LuoZijun
wants to merge
1
commit into
shadowsocks:master
Choose a base branch
from
LuoZijun:json5
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
切换 JSON 库 #378
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LuoZijun
commented
Jan 6, 2021
LuoZijun
commented
Jan 6, 2021
zonyitoo
force-pushed
the
master
branch
2 times, most recently
from
January 19, 2021 08:22
91a256c
to
3094ec6
Compare
@dev4u 当前master就支持注释 |
嗯,是的,我错了。 |
zonyitoo
force-pushed
the
master
branch
2 times, most recently
from
April 17, 2021 13:28
04f420f
to
40764b7
Compare
zonyitoo
force-pushed
the
master
branch
4 times, most recently
from
June 5, 2021 10:19
6d92bd0
to
df87125
Compare
zonyitoo
force-pushed
the
master
branch
7 times, most recently
from
June 25, 2021 17:17
8abaf3c
to
039d7c2
Compare
zonyitoo
force-pushed
the
master
branch
4 times, most recently
from
June 25, 2021 18:09
fb63af2
to
34d4425
Compare
zonyitoo
force-pushed
the
master
branch
2 times, most recently
from
June 25, 2021 18:55
f7cc085
to
6490e34
Compare
zonyitoo
force-pushed
the
master
branch
5 times, most recently
from
July 7, 2021 13:47
a1989fd
to
42b55f1
Compare
zonyitoo
force-pushed
the
master
branch
2 times, most recently
from
April 19, 2022 17:51
4d348d9
to
e1b5518
Compare
I do not think it is a good idea to merge such a pull request. The json5 lib in pull request is a fork from personal github repo, which is not stable enough. the original repo is not well maintained by authors. I searched the json5 supported libraries. the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JSON语法规范背景
基本上,绝大部分的 JSON 库实现的是 IETF 制定的
RFC-8259
。而 IETF 制定的这份标准基本和ECMAScript-2011
里面的文法保持一致。ECMAScript 在版本 2011 发布之后,后续的版本语法发生了较大的改变,连带影响到 JSON 语法的基本就是
String Literals
,以及增加了一些起控制功能字符。在 ECMAScript-2011 之后的版本里面,
String Literals
里面的转义序列支持了\u{CodePoint}
,以及\NonEscapeCharacter
。除此之外,其余的部分则没有变化。JSON5 语法扩展:
Spec: json5
JSON-5 扩展从 ECMAScript 的语法当中,抽取了不少语法来作为 JSON 语法的扩展,如:
新的 JSON 库和当前使用的 JSON 库有何区别?
目前使用的 JSON 库为:callum-oakley/json5-rs
准备切换至: LuoZijun/json-rust
切换原因:当前使用的
json
库,有更多的依赖,以及更大的构建时开销,同时影响着最终的binary
的大小。比较:
\u{CodePoint}
)\u{CodePoint}
)\NonEscapeCharacter