Is JSON validation a best practice? [closed] - json

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Is it a best practice to validate JSON?
With both a JSON schema proposal and a JavaScript implementation of a JSON Schema validator, this practice would seem relatively frictionless to implement. So, is it a no-brainer that should be part of any robust application? Or do you employ other preferred strategies to handle bad JSON?

On the server, validation of data coming from outside is a must.
In the browser, it is redundant from a security POV, if you can vouch that the JSON is generated by server code you control and that any data it depends on has been validated on the server. Even so it can still be useful for debugging.

My 2c on this is that:
(a) Yes, obviously incoming data should be validated, but
(b) The best place to do this is NOT with Json data as is, but with actual business logic objects, iff data binding is used. JSON validation makes only sense if you handle "raw" JSON, but most services (at least in Java) use data binding first and then operate on biz logic objects, not on data format (which often is almost an implementation detail)

Related

Basic of JSON Objects [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I just learned the concept behind JSON objects and there use and I'll love to learn handling of JSON with Java and C++, does anybody have any knowledge about using JSON in the two languages and could provide some useful links and information to aid my way?
I've found JSON in general to be great for quickly storing and re-loading large data structures for quick use between models (or saving information so you can pick up where you left off). I've only ever used it in Python but http://www.json.org/ has a great list of JSON libraries for many languages

What is the best approach to store a pdf file? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Good day all,
Please forgive me if this isn't the right forum to ask this question - but I couldn't think of a more resourceful community.
I handle IT stuff for a small firm where I built a PCI Compliant VB.net application to store credit card information. When a customer gives authorization to keep their card information on file, they are required to sign an Authorization Form. All has been successful thus far, but now they want to be able to store a pdf copy of this authorization form and make it accessible via the application.
I've been thinking of the following ways accomplish this task:
FTP (separate from the DB)
BLOB (directly in the DB)
What's the best approach to achieve this and how would I go about coding this in VB.net? I'm using a MySQL database.
//Kismet
Separate from the DB... just save the URL or file path in the database. In this case then you could split the PDF's up across multiple servers if needed. Also keeps the size of the DB smaller (which you want to backup more frequently).

What are some good data cleanup tools? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am parsing large amounts of complex files (mostly CSV files but some are not) and I need to structure/parse them into some standard formats. This not only involves row wise cleanup of data but some simple individual cell-based logic. I want a tool that a non-programmer can use also so a business team member can write simple drag and drop logic and not take up engineering time. So far, I have looked at Google Refine and Data wrangler and the last one looks great. Are there any other such tools out there?
ETL tools are oriented more towards relational databases, but also have support for XML and CSV file input/output. Examples:
http://www.talendforge.org/
http://kettle.pentaho.com/
Could easily be too complicated for your requirements though. Also, see this similar question on SO (with additional links): What software is availible for data quality checking .

debate over JSON and XML [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I am reading the debate over JSON and XML
And i am not sure why JSON seems to have come out of nowhere to threaten precious XML
And one of the point mentioned is
JSON is a better fit for Web services that power Web mashups and AJAX widgets due to the fact that it is essentially serialized Javascript objects. That’s it. XML will never fit the bill as well for these scenarios without changes to the existing browser ecosystem which I doubt are forthcoming anytime soon.
Could you please tell me what is the exact meaning of this ??
JSON doesn't require html-like markup with opening and closing tags (lots of unneeded code), can be easily fit into JS as it's almost a native JS object sintax, code it's easier to read and to maintain. It's also easier to modify during run-time.
Anyway, for tree-like structures, deep nested children and/or complex structures, I think XML is best suited for the job. JSON is better for data transfer/exchange.
In really short: It is simpler to use JSON than XML in a lot of scenarios (because it consists of serialized JS objects just as you said) and also it provides faster data transfer over the network (and that comes from the not so or less redundant data structures of it, compared to XML).
Regards, Peter

can you recommend me a json viewer application? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I need one that will indent the json for ease of reading
The famous simple file editors - editplus , notepad++ - they all dont have json doc type.
There are a lot of online sites with built in viewer. I need an offline one.
10x.
I have used JSON Viewer, it works nicely and is lightweight. However it's really down to your taste or whether you require some specific features. It's probably worth it to take a look at some screenshots of several different ones first.
The Notepad++ plug in NPP JSON Viewer worked well for me too, it is a little slow with large amounts of data, but does a good job of formatting long JSON strings and displays a structured tree of the data for click through navigation. It would be nice if the tree was searchable, but unfortunately it is currently not.
I have been using the jsmin pluggin which has both JSON viewer and JSON formatter. No problem opening 20MB of data. You can hilight a single json line and Alt+Ctrl+M to format just one line, or you can format the entire file.
http://www.sunjw.us/jsminnpp
You can search in google for notepad++ json plugin... and one of the results => http://sourceforge.net/projects/nppjsonviewer/