moritz/json
View on GitHub ↗ ★ 80 Perl 6
A tiny JSON parser and emitter for Perl 6 on Rakudo
15 mentions on Hacker News by 6 people: 0 stories, 15 comments · first 2012-10-08 · latest 2025-06-28
20082026
-
or raku https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra...
comment by librasteve · 2025-06-28 · in Parsing JSON in Forty Lines of Awk -
…of the argument. Example: turning a data structure into a JSON string, solved with multi dispatch: https://github.com/moritz/json/blob/master/lib/JSON/Tiny.pm#... Another common useful example is constructors. A Date class might have…
comment by perlgeek · 2025-06-01 · in Ovld – Efficient and featureful multiple dispatch for Python -
…just easier with one.) To see an actual parser I often recommend people look at JSON::TINY::Grammar https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra... Frankly from my perspective much of the design of "actual parsers" are a…
comment by b2gills · 2024-11-13 · in Unusual Raku Features -
…when JSON started allowing any value as a top-level result, it actually made the Raku code simpler. https://github.com/moritz/json/commit/9888329771730574967197...
comment by b2gills · 2020-03-03 · in Was Knuth Really Framed? -
…find and fix it within seconds.) A Perl 6 grammar can look remarkably similar in structure to BNF. https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra... https://trac.ietf.org/trac/json/browser/abnf/json.abnf
comment by b2gills · 2018-07-25 · in Designing a Good DSL -
An example would be helpful so here is one https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra...
comment by b2gills · 2018-03-21 · in Regular Expressions – Mastering Lookahead and Lookbehind -
…generally recommend reading the code for JSON::Tiny::Grammar as a quick example of what it is like. https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra...
comment by b2gills · 2018-03-13 · in Exploring the Linguistics Behind Regular Expressions -
…That said, there are ways to approximate some features of grammars with Perl5 regexes[2]. 1: https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra... 2: http://blogs.perl.org/users/brian_d_foy/2013/10/parsing-json...
comment by kbenson · 2017-07-26 · in Why I’m Learning Perl 6 -
…in Perl 6 such as this JSON grammar (a Perl 6 grammar is a class containing Perl 6 named regexes): https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra...
comment by raiph · 2017-04-22 · in You can't parse [X]HTML with regex -
…there's only incomplete doc and no books yet written by the likes of Larry. [1] See, for example, https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra...
comment by raiph · 2016-01-12 · in Why Perl 6 is Different (2010) -
…[4] http://www.infoworld.com/article/2882300/perl/perl-creator-l... [5] https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra...
comment by raiph · 2015-06-27 · in The Three Great Virtues of a Programmer: Laziness, Impatience, and Hubris -
…of Perl 5 regexes. http://en.wikipedia.org/wiki/Perl_6_rules http://doc.perl6.org/language/grammars https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra... Generally matches Perl 5 regexes feature-for-feature but with a much…
comment by raiph · 2015-02-23 · in Why is perl losing its touch? -
…regular expressions that look similar to BNF ) As an example look at this Perl 6 grammar for JSON: https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra... Perl 6's best feature is that it combines many features from many languages…
comment by b2gills · 2015-02-05 · in A little thing to love about Perl 6 and COBOL -
…slides: http://jnthn.net/papers/2012-yapcasia-modules.pdf Modules referenced in Jonathan's talk: * https://github.com/moritz/json/ * https://github.com/jnthn/grammar-debugger/ * https://github.com/jnthn/zavolaj/ *…
comment by draegtun · 2012-10-08 · in Exploring Perl 6 through its Modules (video from YAPC::Asia 2012)