JawnParser

object JawnParser
Companion:
class
Source:
JawnParser.scala
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply(maxValueSize: Int, allowDuplicateKeys: Boolean): JawnParser

Returns a parser that fails on:

Returns a parser that fails on:

  • JSON strings, object keys, or numbers that exceed a given length

  • encountering duplicate keys as per JSONlint

In some cases excessively long values (e.g. JSON numbers with millions of digits) may support denial-of-service attacks. For example, the string constructor for Java's BigInteger is quadratic with the length of the input, and decoding a ten-million digit JSON number into a BigInteger may take minutes.

If allowDuplicateKeys is set to true, the parser will not fail if it encounters an object containing duplicate keys. Note that duplicate keys are not prohibited by the JSON specification, but many linters and other processors do not handle them.

Source:
JawnParser.scala
def apply(maxValueSize: Int): JawnParser

Returns a parser that fails on:

Returns a parser that fails on:

  • JSON strings, object keys, or numbers that exceed a given length

  • encountering duplicate keys as per JSONlint

In some cases excessively long values (e.g. JSON numbers with millions of digits) may support denial-of-service attacks. For example, the string constructor for Java's BigInteger is quadratic with the length of the input, and decoding a ten-million digit JSON number into a BigInteger may take minutes.

Source:
JawnParser.scala
def apply(allowDuplicateKeys: Boolean): JawnParser

If allowDuplicateKeys is set to true, the parser will not fail if it encounters an object containing duplicate keys. Note that duplicate keys are not prohibited by the JSON specification, but many linters and other processors do not handle them.

If allowDuplicateKeys is set to true, the parser will not fail if it encounters an object containing duplicate keys. Note that duplicate keys are not prohibited by the JSON specification, but many linters and other processors do not handle them.

Source:
JawnParser.scala