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