Skip to content

Allows to encode empty tables as arrays.#6

Open
ignacio wants to merge 4 commits into
mpx:masterfrom
ignacio:2347-empty_tables
Open

Allows to encode empty tables as arrays.#6
ignacio wants to merge 4 commits into
mpx:masterfrom
ignacio:2347-empty_tables

Conversation

@ignacio

@ignacio ignacio commented Apr 9, 2013

Copy link
Copy Markdown

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.

ignacio added 4 commits June 28, 2012 09:55
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

tiemei commented May 11, 2013

Copy link
Copy Markdown

+ 1

@kidd

kidd commented Sep 5, 2013

Copy link
Copy Markdown

+1

@deftonee

deftonee commented Apr 16, 2024

Copy link
Copy Markdown

+ 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