I need to build a template for data exchange between two web services using JSON. I believe I need to build a JSON template which could be similar to XSD used in XML. Is that right?
Please guide me to a good tutorial or a good app to generate a JSON template.
Thanks on advance
What you are looking for is called JSON schema. Have a look at wikipedia's page
If you want a schema generator, then look at the answers of this question.
Related
I have an XML and XSD file. I am using Apache NiFi to convert XML to JSON. However, it is nested in many levels and hence I want to validate if the conversion is fine. I want to validate the same using XSD in Apache NiFi.
I will not be able to share the company sensitive information.
Is there any processor or script that I can use? there is an option of writing Python script in a processor called ExecuteScript.
Thanks in advance
There are two parts to your question.
Can JSON be validated via XSD?
Does nifi have a processor that validates JSON via XSD?
The first part already is answered here:
Validate JSON against XML Schema (XSD)
Now for the second part, depending on the solution you end up going with, neither one is implemented in a nifi processor, and attempting to use the ExecuteScript will not work for you because these require use of imported non-native modules. Instead you would need to create your own custom processor with java and import that into nifi which would solve your problem. This is all a bit labor intensive.
Alternatively, you could try a reverse conversion back to XML into an attribute and then validate that attribute content against the original XSD. This is a method I use a lot when writing unit tests. I haven't personally tried this in nifi, but it sounds like it would be possible and would likely be the least complicated solution.
So i have started to work with conversion from XML or JSON to Edifact (EDI), and i have no idea where to begin. i have started to read a bit about edifact and i thought id post a question here to maybe get some pointers of what is good to know and also maybe of some links and places to start learning about conversion to edifact.
So i have started with trying to convert XML to Edifact and soon realized that i would need an XSD for that. And i thought If Edifact is a pretty tightly kept standard, is there any already existing XSDs for Edifact 911 ORDERS and also DESADV. I couldn't find any.
Any information would be helpful at this moment. Thank you!
I don't think you'll find any schemas that aren't proprietary to a translation package. Any schema would probably be a generic representation of the standard, and not specific to your implementation, or your trading partner's guidelines.
Your XML / JSON is proprietary to you (or your ERP). So you'll need to take the XML tags or JSON objects and convert them into the segment/element enveloped structure of the EDIFACT document. BOTS might be able to help you here, as it is open source (Python, I think). Outside of that, there are really great drag/drop mapping tools out there that will allow you to solve your problem.
I am trying to find how to modify the content of an existing local file in Unity 3D.
My content is JSON so that using key variable, I can easily modify. However I can't find any local file modification on internet.
so can anybody help me out with modification of any file? if possible, using JSON too?
Thank you
BTW I'm using MINIJson.
Thank you
Mono has an entire library of file manipulation functions. Your question is not specific to Unity 3D.
MiniJSON supports both serialization and deserialization to and from strings.
If you have a specific question about something you have tried and failed, perhaps you could rephrase your original question and include a code sample of what is not working and I can change my answer.
I'm creating a web apllication and i want to load a json file to a visualization library. the thing is the json file needs to be in a certain format.
I'm using jena to get data in a json file that is in the TALIS format. How can i get the data writen in a custom format?Is it easier to first get them in talis and then transform them or get them in the desired form from the beginning?
I'd appreciate every possible help!
You don't say how you are serving your data to the client-side JavaScript application. I'm going to take a guess, and assume you are using Jena Fuseki to serve the data. If that's not a correct guess, you'll need to update the question to be more precise about your setup.
I don't think that Fuseki currently supports pluggable writers. So your best solution would be to apply a transformation in the client-side JavaScript to turn the JSON you get from the server into the format that's needed by the visualisation library. I've done this myself in a number of rich-client applications that consume RDF data. I usually find that I would need to apply client-side transform code in any case - often it's not just a difference in the format of the JSON, but also that you need to project some slice or aggregation of the data that's just easier to express in JavaScript rather than in SPARQL or equivalent.
I have somewhat unique requirement, which I could not find an answer to so far. I need a JSON to JSON transformation. Preferably, if I could plug it into Apache Camel, that would be wonderful.
As a side note, I would also welcome any suggestion to optimally store the JSON to JSON mapping. Is there any XSLT-based way of achieving this?
Thanks!
Mario
ZORBA with jsonIQ : http://www.jsoniq.org/
it's a native library, but with high performance. You have examples in the web page.
There is a simple design here: https://rawgithub.com/chunqishi/edu.brandeis.cs.json2json/master/docs/design-2014-04-09.html
May be you can improve it by source code, https://github.com/chunqishi/edu.brandeis.cs.json2json.
I know this is an old question, but to refresh the answers, starting from Camel 2.16 there is a new component for JOLT integration. It is very powerful !