You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@groovy.apache.org by Gerald Wiltse <je...@gmail.com> on 2016/03/21 14:26:26 UTC
Groovy MBean to JsonBuilder
I'm working with some MBeans from an Oracle application. In summary, it
seems that JsonBuilder can process an mbean, but not a GroovyMBean. Is
this expected behavior? It might not even be worth doing, it was just a
surprise.
The following
println new JsonBuilder(mbean).toPrettyString()
println new JsonBuilder(new GroovyMBean(mbserver,
mbean)).toPrettyString()
Results in the following:
{
"propertyPattern": false,
"canonicalKeyPropertyListString":
"instanceName=PD80,targetType=webserver",
"keyPropertyList": {
"instanceName": "PD80",
"targetType": "webserver"
},
"serializedNameString": "jde:targetType=webserver,instanceName=PD80",
"propertyValuePattern": false,
"propertyListPattern": false,
"canonicalName": "jde:instanceName=PD80,targetType=webserver",
"domain": "jde",
"domainPattern": false,
"keyPropertyListString": "targetType=webserver,instanceName=PD80",
"pattern": false
}
{
}
Gerald R. Wiltse
jerrywiltse@gmail.com