Child pages
  • Network Message Formating
Skip to end of metadata
Go to start of metadata

Since the communication between ACP Server and Microsoft Add-in is done through network socket communication, the message sent need to be specially formatted so as to keep the structure of the objects intact when sending through the network connection.

Possible Choices

Two popular choices: XML and JSON,  are considered.

JavaScript Object Notation (JSON)

Extensible Markup Language (XML)


  • Provides scalar data types
  • Provide ability to express structured data through objects and arrays
  • Ability to express null object


  • Allow use of comments
  • Support use of namespace to eliminate name collisions


  • No concept of namespace: naming collision is avoided by nesting objects
  • Not natively supported by Java and .NET


  • Does not provide notion of data types
  • Does not support null element
  • Does not natively support expressing of objects and arrays

source from:

Design Decision Made

Since JSON is more data-oriented and lightweight than XML, JSON is used in ACP to structured the request message before sending it through the network connection. Another reason to use JSON is that it allows ACP Server to return an array of objects (eg. List of suggestion objects) natively to Microsoft Add-in. If no suggestions is retrieved based on the user input, it can also send a null object to the Add-in client.

However, with this design decision made, there is a need to look for Java and .NET libraries to provide function to serialize and deserialize objects into JSON.

  • No labels