groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerald Wiltse <jerrywil...@gmail.com>
Subject Groovy MBean to JsonBuilder
Date Mon, 21 Mar 2016 13:26:26 GMT
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

Mime
View raw message