reyesoft / ngx-jsonapi

JSON API client library for Angular 5+ 👌 :: Production Ready 🚀
https://ngx-jsonapi.reyesoft.com/
MIT License
101 stars 52 forks source link

Serialize resource object #238

Closed ZahraAmiri1996 closed 4 years ago

ZahraAmiri1996 commented 4 years ago

Hello, I want to serialize Resource object and then get string of serialized object and send it as parameters in URL also like formurlencoded in HTTP request . How to serialize it ?

pablorsk commented 4 years ago

Hi!

You are broken jsonapi specifcation doing that. But, if you still want to do it, it just does

let data_string = resource.toObject().stringify().

Then, you send data_string to server.