Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rjray/json-withcomments
Perl module to allow parsing JSON data with embedded comments
https://github.com/rjray/json-withcomments
Last synced: 26 days ago
JSON representation
Perl module to allow parsing JSON data with embedded comments
- Host: GitHub
- URL: https://github.com/rjray/json-withcomments
- Owner: rjray
- Created: 2017-08-26T16:24:24.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-02T04:16:56.000Z (over 7 years ago)
- Last Synced: 2023-08-20T23:08:00.087Z (over 1 year ago)
- Language: Perl 6
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
Awesome Lists containing this project
README
# JSON::WithComments - Parse JSON content with comments
## What Is It
JSON::WithComments is a simple sub-classing of the JSON module that
pre-processes the input text to remove any comments. The scrubbed text is
then passed to the `decode` method of the JSON class.Where the JSON module itself can handle comments in the style of Perl/shell
(comments starting with a `#`) by use of the `relaxed` method, this module
also supports the JavaScript/C++ style of comments, as well.## Using JSON::WithComments
JSON::WithComments is simple to use:
```perl
use JSON::WithComments;my $content = <new;
my $hashref = $json->decode($json);
```## Building and Installing
This module builds and installs in the typical Perl fashion:
```
perl Makefile.PL
make && make test
```If all tests pass, you install with:
```
make install
```You may need super-user privileges to install.
## Problems and Bug Reports
Please report any problems or bugs to either the Perl RT or GitHub Issues:
* [Perl RT queue for YASF](http://rt.cpan.org/Public/Dist/Display.html?Queue=JSON-WithComments)
* [GitHub Issues for YASF](https://github.com/rjray/json-withcomments/issues)