sponsor Vim development Vim logo Vim Book Ad

ParseJSON : Simple JSON Parser

 script karma  Rating -2/2, Downloaded by 569    Comments, bugs, improvements  Vim wiki

created by
Po Shan Cheah
script type
This plugin does not do anything by itself. This is a recursive-descent
JSON parser intended to be called from other Vim plugins or scripts.
Although it is possible to parse JSON in Vim using eval(), that is
dangerous if the JSON is from an untrusted source.

Note: true, false, and null are parsed to 1, 0, and {} respectively because
there are no equivalents to those values in Vim script.

    let result = ParseJSON(json_str)

    :echo ParseJSON('{ "hello" : { "a list" : [ 1, 2, "world", true ] }}')
    {'hello': {'a list': [1, 2, 'world', 1]}}
install details
Add parsejson.vim to your Vim plugins folder.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
parsejson.vim 0.0.1 2011-02-08 7.0 Po Shan Cheah Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo