Skip to content
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

Allows to encode empty tables as arrays. #6

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ignacio
Copy link

@ignacio ignacio commented Apr 9, 2013

An option is added to encode empty Lua tables to arrays. The option is encode_empty_table_as_array and is set like this:

   cjson.encode_empty_table_as_array("on")
   assert( cjson.encode{} == "[]" )

By default, the option is off.

This is the only commit that needs to be taken into consideration:
ignacio@a6f950f

The others correspond to other stuff.

An option is added to encode empty Lua tables to arrays. The option is
"encode_empty_table_as_array" and is set like this:

   cjson.encode_empty_table_as_array("on")
   assert( cjson.encode{} == "[]" )

By default, the option is off.

refs #2347
@tiemei
Copy link

tiemei commented May 11, 2013

+ 1

@kidd
Copy link

kidd commented Sep 5, 2013

+1

@deftonee
Copy link

deftonee commented Apr 16, 2024

+ 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants