Blog

Luis Majano

February 10, 2015

Spread the word


Share your thoughts

ColdBox 4 introduces yet more nifty tools for RESTFul web services.  In ColdBox 4, we introduced the capability to do auto-marshaling of RESTFul body content from either JSON or XML formats.  We will take care of the defaults, nulls and incompatibility requirements.  All you have to do is use our event.getHTTPContent() method and pass the appropriate conversion argument. 

The possible conversion boolean arguments are:

  • json
  • xml

If set, ColdBox will auto-marshall the HTTP Body content from JSON or XML to native ColdFusion data types.

myStruct  = event.getHTTPContent( json=true );
xmlObject = event.getHTTPContent( xml=true );
Info: If the content is not json or xml, it will just return the content back to you.

Add Your Comment

Recent Entries

Into the Box - Updates as of May 16th, 2022

Into the Box - Updates as of May 16th, 2022

Into the Box is sneaking up closer and closer. With so many announcements, we can't post them all to the Ortus Solutions blog, so we're going to just give you updates when we can. To read all of our blog posts from ITB, visit the site or subscribe to RSS https://intothebox.org/blog

This week we're going to be announcing the first set of Sessions, some of the Speakers, and some more sponsors. Last week was a big week for Into the Box too, check out the highlights

Gavin Pickin
Gavin Pickin
May 16, 2022
Ortus Content Digest for week of May 13th

Ortus Content Digest for week of May 13th

We were busy this week, we released a lot of content for you... on the podcast, cfcasts, youtube, and our blog. Here's the summary in bite size pieces

Gavin Pickin
Gavin Pickin
May 13, 2022