edn

package module
v0.0.0-...-005c154 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2016 License: MPL-2.0 Imports: 6 Imported by: 1

README

EDN

An EDN parser for Go.

Building

tl;dr:

go get github.com/csm/go-edn
go generate github.com/csm/go-edn

The first command will fetch the sources, but fail to build; the second command will generate the lexer (with nex) and parser (with yacc).

Tested with go 1.5; 1.4 may work too.

License

MPL 2.0

Documentation

Overview

An EDN (http://edn-format.org) parser for Go.

The main entry points for this library are ParseString(string) and ParseReader(io.Reader), which both return a representation of the data according to this library's Value interface.

edn.ParseString(`(:a [123 #{5 7 3}] {"string" 123})`)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpString

func DumpString(value types.Value) string

DumpString accepts any EDN value and will return the EDN string representation.

func ParseReader

func ParseReader(reader io.Reader) (val types.Value, err error)

ParseReader parses EDN from an io.Reader.

Data is returned as a Value in the first return value. The second return value is nil on successful parses, and an error on unsuccessful parses (e.g. syntax error).

func ParseString

func ParseString(string string) (val types.Value, err error)

ParseString is like ParseReader except it takes a string. See ParseReader for more details.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL