Home modules.gotpike.org
Username: Password: [Create Account]
[Forgot Password?]

Modules

ADT
Database
GTK2
GUI
IP
PiJAX
Public
Sql
Stdio
Subversion
System
Tools
Xosd
lua
v4l2
wx

Recent Changes

Public.Parser.XML2 1.50
Public.ZeroMQ 1.1
Public.Template.Mustache 1.0
Public.Protocols.XMPP 1.4
Sql.Provider.jdbc 1.0

Popular Downloads

Public.Parser.JSON2 1.0
Public.Parser.JSON 0.2
GTK2 2.23
Public.Web.FCGI 1.8
Public.Parser.XML2 1.48


Pike Module Reference:

module version 0.1, prepared

  MODULE Public
Modules
Parser

  MODULE Public.Parser
Modules
JSON2

  MODULE Public.Parser.JSON2
Methods
parse()
Description

This module contains a parser to parse JSON into native pike types. The parser has been written in c using ragel (http://www.cs.queensu.ca/~thurston/ragel/). The parser is supposed to handle Unicode strings (internally 8, 16 and 32 bit wide strings that is).

Have a look at http://www.json.org or http://www.ietf.org/rfc/rfc4627.txt?number=4627 for information about what JSON is.


Method parse

array|mapping|string|float|int Public.Parser.JSON2.parse(string s)

Description

Parses a JSON-formatted string and returns the corresponding pike data type.

Throws

Throws an exception in case the data contained in s is not valid JSON.

gotpike.org | Copyright © 2004 - 2019 | Pike is a trademark of Department of Computer and Information Science, Linköping University