Yes, Pakai is the new name!Hi aeric
Pakai framework - is your project web server API ? renamed / renewed
Well what do you mean u can use XML as API... you mean having REST API waiting for xml posts ? or something different ?
Is there anyway to convert json to XML...Yes, Pakai is the new name!
I mean instead of JSON, which parsed by Javascript JSON.Stringify() method in browser, the JavaScript reads XML response returned from the server.
Yes, it is easy! B4J already have Map2xml.Is there anyway to convert json to XML...
or general mapping json to json that seems in some points...
with a method style like mapping ?
it can be feature....
For example you will see it also in your country... with the the Providers of Invoicing (if your country will give that at 3rd providers)... if they have different APIs will be useful to have matching, also an AI matching for first time...
for example <amount> </amount> (xml) -----> to amount: (json)
or for AI:
<amount></amount> -----> to amountvalue:
...can be a tricky... but this will be a life saver....
not a problem... if having different url /convertxml /convertjson (that will be only for developers)Yes, it is easy! B4J already have Map2xml.
But the problem is at js side. The JS to read json and xml are different!
Because I don't want developer to do more work or coding when using my templates.not a problem... if having different url /convertxml /convertjson (that will be only for developers)
Automatic?What about automatic matching.?.. ofcourse xml elements-nodes having inside of them extra elements nodes (lists) or lines... will be difficult... but if some magic of AI could do that... i am sure AERIC-I will be better
<lines>
<0>
<field> </field>
<price> </price>
</0>
<1>
<field> </field>
<price> </price>
</1>
<2>
<field> </field>
<price> </price>
</2>
</lines>
What exactly do that?Automatic?
I already have ReadDataXML method!
actually magic match the values i gave... to each other... give json or xml return me a new post of a different json - xmlWhat exactly do that?
May be i wasn't clear... is someway difficult that i am asking...
1. I am having a REST-API that needs json and have specific fields... i have an example of post (of it)
2. I am having an other REST-API that need xml and have different fields... some may be are the same or the name feels like json post..
Can automatically - magic match them ?
You can write your own mapping by looping through the keys.What exactly do that?
May be i wasn't clear... is someway difficult that i am asking...
1. I am having a REST-API that needs json and have specific fields... i have an example of post (of it)
2. I am having an other REST-API that need xml and have different fields... some may be are the same or the name feels like json post..
Can automatically - magic match them ?
You can write your own mapping by looping through the keys <-that exactly if can be "automatically" and then give the option to save it as template to make some changes will be "magic" and life saver !You can write your own mapping by looping through the keys.
Because once you have the input from client, you converted it to Maps and Lists, everything is straight forward.
The RequestDataXml sub is added to the library allows the server to transform the XML body from a client request into data that easy to work with.
Regardless of what input or output format are!
JSON -> JSON
JSON -> XML
XML -> XML
XML -> JSON
Or even query parameters as input in array or string forms, output to non json or xml response.
All that is up to you!
I believe it can be done automatically without using a loop.You can write your own mapping by looping through the keys <-that exactly if can be "automatically" and then give the option to save it as template to make some changes will be "magic" and life saver !
Not in all cases... but yes.. sometimes... but the difficult are the different fields, types, or may differences that need the target API of any Provider... so that, if feeding an AI system with some xml, json examples will automatic create a mapping for you... that "feed"... will be nice have it in one place like yoursI believe it can be done automatically without using a loop.
If I understand you correctly, I have already incorporated a similar idea in WebApiUtils v4.Not in all cases... but yes.. sometimes... but the difficult are the different fields, types, or may differences that need the target API of any Provider... so that, if feeding an AI system with some xml, json examples will automatic create a mapping for you... that "feed"... will be nice have it in one place like yours
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?