summaryrefslogtreecommitdiff
path: root/src/json.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 8.0.1677: no compiler warning for wrong format in vim_snprintf()v8.0.1677Bram Moolenaar2018-04-081-1/+1
| | | | | Problem: No compiler warning for wrong format in vim_snprintf(). Solution: Add printf attribute for gcc. Fix reported problems.
* patch 8.0.1602: crash in parsing JSONv8.0.1602Bram Moolenaar2018-03-131-1/+13
| | | | | Problem: Crash in parsing JSON. Solution: Fail when using array or dict as dict key. (Damien)
* patch 8.0.1391: encoding empty string to JSON sometimes gives "null"v8.0.1391Bram Moolenaar2017-12-151-3/+3
| | | | | Problem: Encoding empty string to JSON sometimes gives "null". Solution: Handle NULL string as empty string. (closes #2446)
* patch 8.0.0309: cannot use an empty key in jsonv8.0.0309Bram Moolenaar2017-02-051-1/+1
| | | | | Problem: Cannot use an empty key in json. Solution: Allow for using an empty key.
* patch 8.0.0216: decoding js style json may failv8.0.0216Bram Moolenaar2017-01-221-4/+8
| | | | | | Problem: When decoding JSON with a JS style object the JSON test may use a NULL pointer. (Coverity) Solution: Check for a NULL pointer.
* patch 8.0.0180: error E937 is used twicev8.0.0180Bram Moolenaar2017-01-141-1/+1
| | | | | | Problem: Error E937 is used both for duplicate key in JSON and for trying to delete a buffer that is in use. Solution: Rename the JSON error to E938. (Norio Takagi, closes #1376)
* patch 8.0.0171: JS style JSON does not support single quotesv8.0.0171Bram Moolenaar2017-01-111-6/+17
| | | | | Problem: JS style JSON does not support single quotes. Solution: Allow for single quotes. (Yasuhiro Matsumoto, closes #1371)
* patch 8.0.0170: crash in channel testv8.0.0170Bram Moolenaar2017-01-101-1/+2
| | | | | Problem: Channel test fails for using freed memory. Solution: Fix memory use in json_decode().
* patch 8.0.0169: json_decode() may run out of stack spacev8.0.0169Bram Moolenaar2017-01-101-289/+390
| | | | | Problem: For complicated string json_decode() may run out of stack space. Solution: Change the recursive solution into an iterative solution.
* patch 8.0.0166: JSON with a duplicate key gives an internal errorv8.0.0166Bram Moolenaar2017-01-101-1/+27
| | | | | | Problem: JSON with a duplicate key gives an internal error. (Lcd) Solution: Give a normal error. Avoid an error when parsing JSON from a remote client fails.
* patch 8.0.0074v8.0.0074Bram Moolenaar2016-11-101-1/+1
| | | | | | Problem: Cannot make Vim fail on an internal error. Solution: Add IEMSG() and IEMSG2(). (Domenique Pelle) Avoid reporting an internal error without mentioning where.
* patch 8.0.0067v8.0.0067Bram Moolenaar2016-11-061-4/+0
| | | | | Problem: VMS has a problem with infinity. Solution: Avoid an overflow. (Zoltan Arpadffy)
* patch 8.0.0059v8.0.0059Bram Moolenaar2016-11-041-0/+4
| | | | | Problem: Vim does not build on VMS systems. Solution: Various changes for VMS. (Zoltan Arpadffy)
* patch 8.0.0046v8.0.0046Bram Moolenaar2016-10-211-1/+1
| | | | | Problem: Using NUL instead of NULL. Solution: Change to NULL. (Dominique Pelle)
* patch 7.4.2293v7.4.2293Bram Moolenaar2016-08-291-1/+1
| | | | | Problem: Modelines in source code are inconsistant. Solution: Use the same line in most files. Add 'noet'. (Naruhiko Nishino)
* patch 7.4.2258v7.4.2258Bram Moolenaar2016-08-261-10/+25
| | | | | Problem: Two JSON messages are sent without a separator. Solution: Separate messages with a NL. (closes #1001)
* patch 7.4.1976v7.4.1976Bram Moolenaar2016-07-011-6/+6
| | | | | Problem: Number variables are not 64 bits while they could be. Solution: Add the num64 feature. (Ken Takata)
* patch 7.4.1780v7.4.1780Bram Moolenaar2016-04-231-1/+1
| | | | | Problem: Warnings reported by cppcheck. Solution: Fix the warnings. (Dominique Pelle)
* patch 7.4.1666v7.4.1666Bram Moolenaar2016-03-281-1/+3
| | | | | Problem: When reading JSON from a channel all readahead is used. Solution: Use the fill function to reduce overhead.
* patch 7.4.1617v7.4.1617Bram Moolenaar2016-03-201-3/+4
| | | | | Problem: When a JSON message is split it isn't decoded. Solution: Wait a short time for the rest of the message to arrive.
* patch 7.4.1559v7.4.1559Bram Moolenaar2016-03-141-0/+1
| | | | | Problem: Passing cookie to a callback is clumsy. Solution: Change function() to take arguments and return a partial.
* patch 7.4.1498v7.4.1498Bram Moolenaar2016-03-051-0/+1
| | | | | Problem: Error for locked item when using json_decode(). (Shougo) Solution: Initialize v_lock.
* patch 7.4.1467v7.4.1467Bram Moolenaar2016-02-291-1/+1
| | | | | Problem: Can't build without the float feature. Solution: Add #ifdefs. (Nick Owens, closes #667)
* patch 7.4.1446v7.4.1446Bram Moolenaar2016-02-281-0/+1
| | | | | Problem: Crash when using json_decode(). Solution: Terminate string with a NUL byte.
* patch 7.4.1445v7.4.1445Bram Moolenaar2016-02-281-21/+25
| | | | | Problem: Memory corruption when 'encoding' is not utf-8. Solution: Convert decoded string later.
* patch 7.4.1444v7.4.1444Bram Moolenaar2016-02-271-2/+2
| | | | | Problem: Can't build with JSON but without multi-byte. Solution: Fix pointer name.
* patch 7.4.1440v7.4.1440Bram Moolenaar2016-02-271-0/+1
| | | | | Problem: Can't build on Windows. Solution: Change #ifdefs. Only define isnan when used.
* patch 7.4.1439v7.4.1439Bram Moolenaar2016-02-271-9/+16
| | | | | Problem: Using uninitialzed variable. Solution: Initialize vc_type.
* patch 7.4.1437v7.4.1437Bram Moolenaar2016-02-271-18/+0
| | | | | | Problem: Old system doesn't have isinf() and NAN. (Ben Fritz) Solution: Adjust #ifdefs. Detect isnan() and isinf() functions with configure. Use a replacement when missing. (Kazunobu Kuriyama)
* patch 7.4.1434v7.4.1434Bram Moolenaar2016-02-271-5/+67
| | | | | Problem: JSON encoding doesn't hanel surrogate pair. Solution: Improve multi-byte handling of JSON. (Yasuhiro Matsumoto)
* patch 7.4.1430v7.4.1430Bram Moolenaar2016-02-271-5/+5
| | | | | | | Problem: When encoding JSON, turning NaN and Infinity into null without giving an error is not useful. Solution: Pass NaN and Infinity on. If the receiver can't handle them it will generate the error.
* patch 7.4.1408v7.4.1408Bram Moolenaar2016-02-231-5/+16
| | | | | Problem: MS-Windows doesn't have isnan() and isinf(). Solution: Use _isnan() and _isinf().
* patch 7.4.1407v7.4.1407Bram Moolenaar2016-02-231-3/+48
| | | | | | | Problem: json_encode() does not handle NaN and inf properly. (David Barnett) Solution: For JSON turn them into "null". For JS use "NaN" and "Infinity". Add isnan().
* patch 7.4.1367v7.4.1367Bram Moolenaar2016-02-201-1/+1
| | | | | Problem: Compiler warning for unreachable code. Solution: Remove a "break". (Danek Duvall)
* patch 7.4.1315v7.4.1315Bram Moolenaar2016-02-131-0/+1
| | | | | Problem: Using a channel handle does not allow for freeing it when unused. Solution: Add the Channel variable type.
* patch 7.4.1279v7.4.1279Bram Moolenaar2016-02-071-44/+94
| | | | | | Problem: jsonencode() is not producing strict JSON. Solution: Add jsencode() and jsdecode(). Make jsonencode() and jsondecode() strict.
* patch 7.4.1278v7.4.1278Bram Moolenaar2016-02-071-5/+16
| | | | | Problem: When jsonencode() fails it still returns something. Solution: Return an empty string on failure.
* patch 7.4.1269v7.4.1269Bram Moolenaar2016-02-061-7/+11
| | | | | Problem: Encoding {'key':} to JSON doesn't give an error (Tyru) Solution: Give an error.
* patch 7.4.1261v7.4.1261Bram Moolenaar2016-02-041-4/+1
| | | | | | | Problem: Pending channel messages are garbage collected. Leaking memory in ch_sendexpr(). Leaking memory for a decoded JSON string. Solution: Mark the message list as used. Free the encoded JSON. Don't save the JSON string.
* patch 7.4.1243v7.4.1243Bram Moolenaar2016-02-021-1/+1
| | | | | Problem: Compiler warning for uninitialized variable. Solution: Initialize it. (Elias Diem)
* patch 7.4.1238v7.4.1238Bram Moolenaar2016-02-021-123/+300
| | | | | | Problem: Can't handle two messages right after each other. Solution: Find the end of the JSON. Read more when incomplete. Add a C test for the JSON decoding.
* patch 7.4.1231v7.4.1231Bram Moolenaar2016-02-011-2/+4
| | | | | Problem: JSON messages are not parsed properly. Solution: Queue received messages.
* patch 7.4.1229v7.4.1229Bram Moolenaar2016-01-311-0/+27
| | | | | Problem: "eval" and "expr" channel commands don't work yet. Solution: Implement them. Update the error numbers. Also add "redraw".
* patch 7.4.1192v7.4.1192Bram Moolenaar2016-01-281-0/+5
| | | | | | Problem: Can't build with FEAT_EVAL but without FEAT_MBYTE. (John Marriott) Solution: Add #ifdef for FEAT_MBYTE.
* patch 7.4.1188v7.4.1188Bram Moolenaar2016-01-281-1/+1
| | | | | Problem: Using older JSON standard. Solution: Update the link. Adjust the text a bit.
* patch 7.4.1166v7.4.1166Bram Moolenaar2016-01-241-7/+19
| | | | | | Problem: Can't encode a Funcref into JSON. jsonencode() doesn't handle the same list or dict twice properly. (Nikolay Pavlov) Solution: Give an error. Reset copyID when the list or dict is finished.
* patch 7.4.1164v7.4.1164Bram Moolenaar2016-01-241-3/+7
| | | | | | Problem: No tests for comparing special variables. Error in jsondecode() not reported. test_json does not work Japanse system. Solution: Set scriptencoding. (Ken Takata) Add a few more tests. Add error.
* patch 7.4.1160v7.4.1160Bram Moolenaar2016-01-231-0/+1
| | | | | Problem: No error for jsondecode('"'). Solution: Give an error message for missing double quote.
* patch 7.4.1156v7.4.1156Bram Moolenaar2016-01-231-2/+6
| | | | | Problem: Coverity warns for NULL pointer and ignoring return value. Solution: Check for NULL pointer. When dict_add() returns FAIL free the item.
* patch 7.4.1154v7.4.1154Bram Moolenaar2016-01-231-0/+509
Problem: No support for JSON. Solution: Add jsonencode() and jsondecode(). Also add v:false, v:true, v:null and v:none.