Tag

DynamicMethod

1 views collected around this technical thread.

FunTester
FunTester
Oct 28, 2021 · Backend Development

Adding Custom Methods to fastjson JSONObject Using Groovy MetaClass

This article demonstrates how to dynamically add custom methods to fastjson's JSONObject in Groovy by leveraging MetaClass and closures, providing code examples that simplify JSON traversal and output during API testing for developers.

DynamicMethodGroovyJSONObject
0 likes · 4 min read
Adding Custom Methods to fastjson JSONObject Using Groovy MetaClass