added nested json response
added field config in defineClass()