Tag:gson

  • Gson and List Objects’Matching Tour

    Time:2019-8-23

    With the improvement of people’s living standard, the channel of matchmaking between people has been further improved. Recently, I occasionally saw several variety shows of dating, whether civilians or stars. It can be seen that the tide of matchmaking is coming. That’s not why two old guys, Google and Java, can’t sit still, thinking that […]

  • Gson parsing Json fault tolerance is the key, to cite a few common examples!

    Time:2019-7-22

    I. Preface A few days ago, I wrote an article about data fault tolerance between JSON serialization and deserialization using GSON. The simplest [email protected] to configure multiple different JSON Key values, or to reuse [email protected] configure some exceptions. More complex data can be solved by using Type Adapter, which can be said to be a […]

  • Gson Conversion-json Data Conversion to Object Entity Common Method

    Time:2019-5-27

    Gson Conversion-json Data Conversion to Object Entities Recently, when making remote interface calls, data needs to be encrypted and decrypted, so the parameters returned are uniformly in the following JSON format { “code”:0, “Msg”, “Success”. “sign”:”abcdefghijkl”, “timestamp”:1491897441000, “data”:{} } First, we assume that the object entities in the transmission process are user.java public class User […]

  • Gson – Compare two order-independent JSON strings

    Time:2019-5-26

    Gson – Compare two order-independent JSON strings When map data is converted to json, JSON output is out of order because map is out of order.When we compare the two jsons, we need to ignore their order of comparison. The methods of comparison are as follows: Assuming that we have ID and name in our […]