gj_decode
Decoder module for GJ
See module gj for the public interface
Types
ParseError
Types of errors that can occur during parsing
pub type ParseError {
UnexpectedToken(String)
UnexpectedEndOfInput
InvalidString
InvalidUnicodeSequence
InvalidNumber
}
Constructors
-
UnexpectedToken(String) -
UnexpectedEndOfInput -
InvalidString -
InvalidUnicodeSequence -
InvalidNumber
ParseErrorLocation
Location of a parser error
pub type ParseErrorLocation {
ParseErrorLocation(row: Int, column: Int)
}
Constructors
-
ParseErrorLocation(row: Int, column: Int)
Functions
decode
pub fn decode( str: String, ) -> Result(JSON, tuple(ParseError, ParseErrorLocation))