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

Feature request: type safe / check and casting of incorrect yet castable/adaptable values #109

Open
nissaba opened this issue Mar 9, 2018 · 0 comments

Comments

@nissaba
Copy link

nissaba commented Mar 9, 2018

Hi, ok I may be asking for a lot here. but if this is possible it will be kick ass.

I get my JSon from a API service that will try to reduce the JSON to a minimum.
So what happens is that say for a JSON like {"a": [{object 1}, {object 2}, ... {object n-1}, {object n}]}
if the system only needs to return 1 object in array "a" it will send instead {"a":{object1}}
so this needs to be adapted to an array [object1]

an other thing that it does is say we are supposed to get a string in some field.. {"s": "hello world"}
but the server needs to return a string that is numeric only say a phone number with not formating characters, for example 15145555555 will get {"s": 15145555555}. But this number can be cast to a string.

And also lastly the hardest point is Some API will return a JSON structure where the first part is always the same but the will attache varied object.

for example the result for a request for a person {"status": true, "data":{... persone data ...}}
and for say result for a painting description {"status": true, "data":{... painting data ...}}

it would be nice that we can in the JSON we give to JSONExport some tags or what not that will let it know that the object is dynamic. I know this will use PATs but this would get JSONExport to the next level. example {"status": true, "data":{#Dynamic#}} or {"status": true, "data":}

@nissaba nissaba changed the title Feature request: type safe / check and casting of incorrect yet castable/adatable values Feature request: type safe / check and casting of incorrect yet castable/adaptable values May 4, 2018
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

1 participant