Code Monkey home page Code Monkey logo

jsondoc's People

Contributors

jjmrocha avatar

Watchers

 avatar  avatar  avatar

jsondoc's Issues

Advanced manipulation functions

get(Doc, Field) – Return field value
get(Array, Index) – Return element
get(Array, Query) – Return list on elements matching Query
get(JSON , Path) – Return the result of the execution of PATH

set(Doc, Field, Value) – Changes field value
set(Array, Index, Value) – Change element
set(Array, Query, Value) – Change list on elements matching Query
set(JSON , Path, Value) – Change the result of the execution of PATH

Where:
Field :: binary() | atom()
Doc :: jsondoc()
Index :: integer()
Array :: list()
Query :: {Field, Value}
Value :: term()
Path :: [PathKey, …]
PathKey :: Field | Index | Query
JSON :: Doc | Array

Encoding change

I would like to propose that the encoding of the values between -0.0000000001 and 0.0000000001 also uses the compact format.

Today:
erl> jsondoc:encode([{value, 0.0}]).
<<"{"value":0.00000000000000000000e+00}">>
erl> jsondoc:encode([{value, 0.1}]).
<<"{"value":0.1}">>

My proposal:
erl> jsondoc:encode([{value, 0.0}]).
<<"{"value":0.0}">>
erl> jsondoc:encode([{value, 0.1}]).
<<"{"value":0.1}">>

Thank you.

Best regards,
Gonçalo Pereira

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.