Comments (6)
@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.
@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.
@jdnichollsc ok thanks friend
from restclient.
@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.
@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.
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)
- 404 Error when using DELETE HOT 3
- has no meta file, but it's in an immutable folder. The asset will be ignored. HOT 4
- can not debug anything/not getting any debugs in console after adding this package HOT 1
- Update promises to be awaitable using `async`/`await` HOT 6
- Missing Meta files
- Empty response on RestClient GET, works with curl HOT 1
- Can this library be called by hololens2 HOT 4
- Can't send post request after Update to latest version HOT 2
- Lost reference to script in GET
- Can't use GET in hololens build
- Running multiple POST requests using Promise.ThenAll returns an IEnumerable of ResponseHelper objects, not all of them returned Data
- How can I add mode in proyecto26? HOT 1
- Post not working on WebGL compilation HOT 3
- Can i use this asset to make my offline game multiplayer? HOT 1
- Default seralizer JsonUtility cannot serialize records HOT 1
- Why not async/await? HOT 2
- Using RestClient as a dependency in a unity package HOT 1
- Error while downloading file from Firebase Storage
- Specified cast is not valid. HOT 1
- Crashlytics reporting constant Fatal Exception: java.lang.Exception
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from restclient.