Tag

JSONObject

0 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
FunTester
FunTester
Aug 23, 2019 · Backend Development

Utility Class for Counting Occurrences in Java/Groovy Using JSONObject

This article presents a reusable Java/Groovy utility class that leverages JSONObject's containKey method to count occurrences of values, offering multiple overloaded count methods for single objects, lists, and list elements, along with example code and usage notes.

CountingJSONObjectJava
0 likes · 4 min read
Utility Class for Counting Occurrences in Java/Groovy Using JSONObject