JSON-RPC and XML-RPC in C/C++

Unlike Lua, C/C++ does not support runtime introspection. As a result, JSON-RPC and XML-RPC require more support code in C/C++. For example, the Lua XML-RPC stack uses introspection to automatically deserialize and serialize Lua objects. C/C++ applications must explicitly deserialize request data and serialize response data.

REST is another common way to expose device functionality over HTTP. Instead of using an RPC envelope, a REST API models device functions as resources, uses standard HTTP methods such as GET, POST, PUT, and DELETE, and often exchanges JSON. For a practical C/C++ example using the Barracuda Embedded Web Server and the Virtual File System, see Designing Embedded RESTful Services in C and C++.

See the C/C++ reference manual for more information: