parser.asMap
parser.asMap(object)
Description
Converts the object into a map.
Parameters
| Parameter | Type | Explanation |
|---|---|---|
| object | Object | Any value to be parsed into a map |
Example
json = '''
{
"emails": [
{
"value": "xxx.yyy@aaa.ch",
"primary": true
}
],
"preferredLanguage": "de",
"name": {
"familyName": "xxx",
"givenName": "yyy"
},
"active": true,
"id": "1234",
"userName": "xxxyyy",
"phoneNumbers": [
{
"value": "+415x2x8206x"
}
]
}
'''
def res = parser.asMap(json)
println res.name.familyName