Class ConfigurableJsonSlurper
java.lang.Object
io.restassured.internal.path.json.ConfigurableJsonSlurper
Copy of Groovy's JsonSlurper class. The reason why this is needed is because in 1.8.5+ Groovy's JsonSlurper no longer
returns floats and doubles and instead returns BigDecimal. ExpandoMetaClasses doesn't work for Java classes so that's the
technical reason for copying (what we really want to do is to override the
JsonToken.getValue()).
In order to maintain RA backward compatibility this class is created.
The copied methods are:
- parse
- parseText
- parseArray
- parseObject
There's also a tiny change in the parse method indicated by the "Added by Johan Haleby" comment.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ConfigurableJsonSlurper
-
-
Method Details
-
parseText
Parse a text representation of a JSON data structure- Parameters:
text- JSON text to parse- Returns:
- a data structure of lists and maps
-
parse
Parse a JSON data structure from content from a reader- Parameters:
reader- reader over a JSON content- Returns:
- a data structure of lists and maps
-