Skip to content

Instantly share code, notes, and snippets.

View RevelMind's full-sized avatar
:octocat:
how's your day going?

Zack RevelMind

:octocat:
how's your day going?
  • Canada
View GitHub Profile
@mavc
mavc / jsonparser.py
Created September 29, 2012 05:00
pyparsing demonstration
"""
Sample JSON decoder for demonstrating how to use pyparsing.
"""
import pyparsing as pp
# JSON types are number, string, boolean, object, array, and null.
# A boolean is either the literal 'true' or the literal 'false'. Set a
# parsing action that just replaces it with the Python equivalent.
boolean = (