json
The shortest code JSON Parser in history
All the procedures are purely functional
Easy and powerful hight-order fuctions
No external dependencies, good portability
a portable, powerful and pure functional JSON library for Scheme
License: MIT License
The shortest code JSON Parser in history
All the procedures are purely functional
Easy and powerful hight-order fuctions
No external dependencies, good portability
当字符串里面本身带有引号时,json->string方法输出的格式有问题。需要对字符串进行转换处理。
使用你的core库解决此问题。
$ git diff -w HEAD
diff --git a/json.sc b/json.sc
index 29f92e1..6748fd3 100644
--- a/json.sc
+++ b/json.sc
@@ -36,6 +36,7 @@
(import
(scheme)
(only (core alist) vector->alist)
+ (only (core string) string-replace)
)
@@ -131,7 +132,7 @@
(define f
(lambda (x)
(cond
- ((string? x) (string-append "\"" x "\""))
+ ((string? x) (string-append "\"" (string-replace x "\"" "\\\"") "\""))
((number? x) (number->string x))
((symbol? x) (symbol->string x)))))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.