Microsoft Azure

What is JSON and How Is It Used?

I’m not a developer, and I’m guessing if you’re a regular Petri IT Knowledgebase reader, neither are you. But as a system administrator, you will probably have come across XML, or Extensible Markup Language, which is used for defining documents in such a way that mere mortals can also read and understand the format. And while sysadmins are more familiar with XML as a means of defining documents, it’s also commonly used for defining data structures used by web services.

JSON versus XML

JSON stands for JavaScript Object Notation, and one of the primary reasons to use it over XML is that data can be loaded asynchronously more easily than using XML, so JSON is finding popularity in web services. JSON is more lightweight than XML because it mainly contains the data that needs to be transferred, rather than a lot of markup used to define the structure of the data. JSON is used to serialize data, or in other words convert the data into a format that can be stored. For example, it’s possible to present JSON data as a JavaScript object, or simply serialize and deserialize the data.

Additionally, JSON helps AJAX developers — think JavaScript and XML — overcome Same Origin Policy restrictions where code from one domain can’t request data from another. For example, if you want to pull data from a third-party web service, JavaScript Object Notation with Padding (JSONP) can be used to retrieve the data that usually has a function call wrapped around it.

Azure Resource Manager templates

So why am I writing about JSON on Petri? Because as a system administrator, sooner or later you’re likely to come across JSON, and understanding how it differs from XML might be useful. But the reason I was compelled to write this piece is that Azure Resource Manager templates use JSON, and for a complete understanding of this technology, an overview of JSON has value.

Sponsored Content

Read the Best Personal and Business Tech without Ads

Staying updated on what is happening in the technology sector is important to your career and your personal life but ads can make reading news, distracting. With Thurrott Premium, you can enjoy the best coverage in tech without the annoying ads.

There will be more articles on Petri soon about how to use Azure Resource Manager, but for the time being, if you haven’t come across it yet, Resource Manager is the new default method in the preview management portal for deploying applications in Azure, and that includes virtual machines. With the help of JSON-defined templates, entire applications can be deployed in the cloud, and more easily than relying on other automation methods, such as the Azure cmdlets for PowerShell.

Related Topics:

BECOME A PETRI MEMBER:

Don't have a login but want to join the conversation? Sign up for a Petri Account

Register
Comments (0)

Leave a Reply

IT consultant, Contributing Editor @PetriFeed, and trainer @Pluralsight. All about Microsoft, Office 365, Azure, and Windows Server.

Download this eBook!

External Sharing and Guest User Access in Microsoft 365 and Teams

his eBook will dive into policy considerations you need to make when creating and managing guest user access to your Teams network, as well as the different layers of guest access and the common challenges that accompany a more complicated Microsoft 365 infrastructure. The eBook will also outline some of the major decision points across four general-purpose guest access policy scenarios for how an organization can set this up with standard licensing.

Download Now

Sponsored By