Giter Club home page Giter Club logo

Comments (6)

richfuns avatar richfuns commented on May 24, 2024 1

@jdnichollsc Thanks friend
But I think you did not answer the question clearly.
"This library is using the JsonUtility " Is that means this library can not parse the response data structure like:
RestClient.Post<ResultBean<PageBean2>>(currentRequest)

Am I correct?

If not, how could I change deserialize tools to others? Rewrite this library or something?

Look forward to your replying.
thanks.

from restclient.

richfuns avatar richfuns commented on May 24, 2024 1

@jdnichollsc hi, friend
Actually, I have no idea which deserialize library I could use based on my demand.

JsonUtility seems not working fine.

My response result just like below:

{ "code": 100, "msg": "", "data": { "list": [ { "id": "1", "addtime": "2018-08-07 20:58:03", "updatetime": "2018-08-07 20:58:03" }, { "id": "2", "addtime": "2018-08-01 20:25:26", "updatetime": "2018-08-01 20:25:30" } ] } }

So I need to parse the data using RestClient.Post<ResultBean>(currentRequest)

ResultBean and PageBean are all generic class and T is the list entity.

Thank you .

from restclient.

richfuns avatar richfuns commented on May 24, 2024 1

@jdnichollsc ok thanks friend

from restclient.

jdnichollsc avatar jdnichollsc commented on May 24, 2024

@richfuns this library is using the JsonUtility class of Unity, if you want you can use other tools to deserialize the response of the server 👍

from restclient.

jdnichollsc avatar jdnichollsc commented on May 24, 2024

@richfuns this library is only a wrapper to improve the code to make http requests, what library do you want to use to parse the response? I can attach an example with the tool you want to use to deserialize the JSON :)

from restclient.

jdnichollsc avatar jdnichollsc commented on May 24, 2024

If you want to use other JSON library, you need to modify the code to use the ResponseHelper class: #31 (comment)

In the previous example you can replace the JsonUtility class of Unity to user a third party library instead :)

from restclient.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.