Skip to content

Instantly share code, notes, and snippets.

@biskandar
Created October 8, 2012 12:25
Show Gist options
  • Save biskandar/3852249 to your computer and use it in GitHub Desktop.
Save biskandar/3852249 to your computer and use it in GitHub Desktop.
Simplified webserver module using Webduino library 2012100804
aJsonObject *jsonResponse( char *statusCode , char *statusDesc ) {
aJsonObject *jsonRoot = aJson.createObject() ;
aJson.addNumberToObject( jsonRoot , "millis" , (int) millis() ) ;
aJson.addStringToObject( jsonRoot , "status-code" , statusCode ) ;
aJson.addStringToObject( jsonRoot , "status-desc" , statusDesc ) ;
return jsonRoot ;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment