GithubHelp home page GithubHelp logo

guenchi / json Goto Github PK

View Code? Open in Web Editor NEW
47.0 8.0 4.0 919 KB

a portable, powerful and pure functional JSON library for Scheme

License: MIT License

Scheme 100.00%
scheme json json-parser json-api json-library portable pure-functional library chez chez-scheme

json's Introduction

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

Manual

Portable Dependencie Free Version

json's People

Contributors

guenchi avatar vincenttoups avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

json's Issues

BUG:字符串的错误

当字符串里面本身带有引号时,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)))))

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.