tarantool / tarantool/tarantool
Make JSON encoder to be more stardatized
Open
Nobody has claimed this yet.
raw idea
- Dominant language
- Lua
- Stars
- 3.7k
- Forks
- 419
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 88
Description
Quote:
Numeric values that cannot be represented in the grammar below (such as Infinity and NaN) are not permitted.
- enable
encode_invalid_as_niland disableencode_invalid_numbersby default - patch JSON to use more JavaScript like name for bad numbers:
Infinity,-Infinity,NaNand-NaN(alsoisinfisn't, currently, used - https://github.com/mpx/lua-cjson/blob/master/lua_cjson.c#L592-L617)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the quoted JSON grammar and the linked lua_cjson.c lines 592-617, then trace how encode_invalid_as_nil and encode_invalid_numbers are handled. Check how invalid numeric values are currently named and determine the requested default settings and JavaScript-like spellings. The issue names no test file or test command, so completion would require verifying both option defaults and encoded output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100