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

BoxLang AI 3.4.0: Gateways, Human-in-the-Loop, and a Full Security Stack

BoxLang AI 3.4.0: Gateways, Human-in-the-Loop, and a Full Security Stack

BoxLang AI 3.4.0 is one of the biggest releases in the module's history, and it is built around a single theme: trust. Every agent you ship eventually needs a human to step in, and every agent that reads untrusted content is a target for prompt injection. This release gives you both a proper answer.

Luis Majano
Luis Majano
September 01, 2026