Benefits of validating data using javascript

by  |  25-Sep-2016 22:38

benefits of validating data using javascript-2benefits of validating data using javascript-78

What this means is that one spec can be used to transfer data between systems regardless of their implementation language.

For example, installing the base class in the Gem for more details).

Though JSON has many obvious advantages as a data interchange format - it is human readable, well understood, and typically performs well - it also has its issues.

Where browsers and Java Script are not consuming the data directly – particularly in the case of internal services – it’s my opinion that structured formats, such as Google’s Protocol Buffers, are a better choice than JSON for encoding data.

If you’ve never seen Protocol Buffers before, you can check out some more information here, but don’t worry - I’ll give you a brief introduction to using them in Ruby before listing the reasons why you should consider choosing Protocol Buffers over JSON for your next service. The docs say: above), and fields are numbered, which aids in backward compatibility, which I’ll cover in more detail below.

Community Discussion