Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE JSON encoding/decoding for models #5

Open
jsfan3 opened this issue Apr 28, 2020 · 3 comments
Open

RFE JSON encoding/decoding for models #5

jsfan3 opened this issue Apr 28, 2020 · 3 comments

Comments

@jsfan3
Copy link

jsfan3 commented Apr 28, 2020

Until now I used a lot PropertyBusinessObject to store the data. I'm used to create the app database using almost only PropertyBusinessObject objects. They are very convenient to exchange data with any external service, because they can seamlessly be converted to JSON and populated from JSON. Moreover, the RequestBuilder class offers method to send a PropertyBusinessObject object as body request and to fetch a PropertyBusinessObject object as the result of a request. At the moment, I consider the PropertyBusinessObject class as fundamental.

Your new CodeRAD model is very interesting, but it introduces a new way to store data in Entity objects. That makes sense, but do we lost all the advantages of the PropertyBusinessObject class? How can I use the CoreRAD concepts while maintaining all the advantages of the PropertyBusinessObject class in REST requests?

Thank you

@shannah shannah changed the title Model (Entity) to/from json and in REST requests RFE JSON encoding/decoding for models Apr 28, 2020
@shannah
Copy link
Owner

shannah commented Apr 28, 2020

This is on my list of things. The view models are designed to make conversion to other formats easy. I chose not to use PropertyBusinessObject because it wasn't quite right for the full scope of code rad. However I do plan to replicate all useful aspects of PropertyBusinessObjects, and provide easy versions to/from property business objects.

@shannah
Copy link
Owner

shannah commented Apr 29, 2020

Closely related to #5

@shannah
Copy link
Owner

shannah commented Oct 10, 2020

I have added support for decoding Entities from JSON and XML. Converting from Entity to JSON/XML is an easier task that is still pending. Support for decoding from JSON/XML is described here:
https://shannah.github.io/CodeRAD/manual/#_serialization_working_with_xml_and_json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants