Java tips: a flexible JSON extraction tool

1. Problem scenario The usual way for Java to process JSON data is to convert it into a Java class object through a third-party library, but this will lead to a lot of temporary classes that have nothing to do with the product business. In JavaScript, you can directly extract, such as obj user. Name, very convenient. But in Java, if you don't ...

Added by vomitbomb on Sun, 06 Feb 2022 06:09:16 +0200

Java tips: a flexible JSON building tool

1. Problem scenario In fact, there are very mature and convenient schemes for the construction of JSON data in network transmission, but it is inevitable to encounter some non-standard special situations in practical work, such as: Similar data, the same field has different meanings in different interfaces and different value ranges;The same ...

Added by public-image on Mon, 31 Jan 2022 03:45:07 +0200