Home > Features > Opinions > JSON vs. XML: An Adult Perspective • Bookmark   • Newsletters   • Register Search Options

FEATURE

JSON vs. XML: An Adult Perspective

JSON vs. XML: An Adult Perspective

July 28, 2012
Text size: 
View in Digital Mag
Get XBIZ News
XBIZ Research
Are you considering Bitcoin as an alternative form of payment for your business?
Yes
  24.34%
No
  46.03%
I don't know enough about it
  29.63%
Out of 189 votes. Results based on votes submitted by members of XBIZ.net social network.

" Some experts say that browser scripting is easier when using JSON, especially when pushing server-side data to clients. "

Webmaster Central’s recent addition of JSON support to its leased content services has brought the use of this technology to the forefront of adult, but what are the benefits?

“Compelling and dynamic content is an essential component for generating revenue with adult entertainment websites,” states a Webmaster Central spokesperson. “How that content is delivered is equally important, since a growing number of porn fans are now using mobile devices to connect to the Internet.”

Thus, having leased content that supports mobile and tablet ready formats is vital — and an application that may be more suited to JavaScript Object Notation (JSON) than to extensible markup language (XML) for gateway integration.

Let’s take a closer look:

According to JSON.org, the technology is a lightweight data-interchange format that is easy for humans to read and write and for machines to parse and generate. A subset of the JavaScript programming language, JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of C-type languages, including JavaScript and Perl.

XML and JSON can do pretty much the same thing.

Although XML is a well established format that boasts mature toolsets and is more readily readable by humans than are many other code formats, including JSON, working directly with it when inserting data into HTML pages via JavaScript can be cumbersome — still, its openness and proven reliability keep it in favor.

But JSON has growing support due to some substantial advantages.

Some experts say that browser scripting is easier when using JSON, especially when pushing server-side data to clients, such as in Webmaster Central’s example. JSON code is also much more streamlined than XML, making typical HTML documents load faster.

JSON can also be parsed more efficiently and may be used to get around the security restrictions found in JavaScript’s same-source policy, when JSON files are imported as a <script> tag. This makes working with third-party content from different domains much easier, but care must be taken to vet content partners before allowing this level of access — there is a reason that JavaScript and other technologies prevent such code execution.

Although the superiority debate continues and the benefits are occasionally negligible from using one technology over the other, most observers today, including Ben from Ajaxian, believe that the bottom line is that JSON, combined with JavaScript, is better at delivering dynamic content than is XML.

“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, which makes it [a better fit for] client side scripting, which is primarily done in JavaScript. That’s it,” Ben opined. “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.”

Take a look at how your site uses XML and see if JSON will improve the process — the cross-domain scripting advantages alone may make it well worth your while.


LEGAL PERSPECTIVES

DMCA, Safe Harbor - Tube Sites Take Note

On March 14, the 9th U.S. Circuit Court of Appeals handed down an important ruling for companies that operate websites that allow users to upload content for display, as well as for content producers whose... More »

Ask The Attorney: Future of Obscenity Laws

Will obscenity laws and enforcement exist 20 years from now? J.D. OBENBERGER 1. That every action causes an equal and opposite reaction is not just a law of physics; I think it’s true in society... More »

The Proper DMCA Takedown Notification

On October 28, 1998, President Bill Clinton signed into law the Digital Millennium Copyright Act (the “DMCA”). Since becoming valid law, the DMCA has been controversial to say the least, with... More »
XBIZ NEWSLETTERS
Stay informed of the latest industry developments. Get XBIZ newsletters delivered to your inbox. Subscribe today!
Enter email address:

* To manage existing subscriptions click here.






POPULAR PRODUCTS & SERVICES
Submit your press release to
multiple news outlets with 1 click.
Subscribe to RSS news feeds or
add free content to your website.
Access XBIZ news and articles
with your mobile device.
Access the latest issues of the industry's leading trade publications in digital form. View online or download for offline viewing.

UPCOMING EVENTS

Eurowebtainment

May 22 - May 25
Majorca, Spain

Exxxotica South Florida

May 31 - Jun 02
Fort Lauderdale, Florida

The ETO Show

Jun 23 - Jun 24
Birmingham, United Kingdom

EXXXOTICA Chicago

Jul 12 - Jul 14
Chicago, Illinois
Everyday thousands of business professionals browse XBIZ's industry directory for quality products and services. Not listed yet? Your company could be losing potential new business. Submit your company today!
Use XBIZ RSS feeds to stay informed of the latest industry developments or as a content syndication tool for your website!