Giter VIP home page Giter VIP logo

gopher-json's People

Contributors

j-vizcaino 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gopher-json's Issues

Comment after package name.

In de .go files in gopher-json there is a comment after package .

This causes the following error:
workflow/queue.go:13:2: code in directory /Volumes/external_disk/Ziggo/Git/Go/src/github.com/layeh/gopher-json expects import "layeh.com/gopher-json"

I changed this:
package json // import "layeh.com/gopher-json"

to this:
package json

for all the go files in layeh.com/gopher-json and now my code compiles fine.
The go version I use is:
go version go1.7.4 darwin/amd64

If you require any more information please let me know.

Paul.

Stable decode/encode with empty maps and arrays

The library does not seem to support propagating original type when decoding/encoding empty maps and arrays.

As a result:

  • decoding an empty map leads to an empty Lua table (expected)
  • decoding an empty array leads to an empty Lua table (expected as well since Lua makes no difference between maps and arrays)
  • encoding an empty table leads to "null": this is unexpected and breaks stability of encode/decode process.

In order to illustrate the issue, I have created a test-case (see associated PR #7)

encode LTable to JSON Array

Would it be possible, and within the scope of this library, to add a function that imported numeric keys in a table to an array instead of an object with the label of the number?

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.