illuminated-g / lv-http-server

HTTP Server implementation in LabVIEW. Utilizes IG TCP Streams and provides mechanisms akin to Web Services.
MIT License
9 stars 0 forks source link

Integrate [JSON] serialization for request data and formatted response generation #3

Open negentropicdev opened 2 years ago

negentropicdev commented 2 years ago

To start with, JSON in LV is a PITA. 3rd party libraries exist that almost eliminate the pain but may have implementations that can significantly affect performance (lots of type inspection and programmatic variant value construction/disassembly). Providing easier mechanisms, such as a JSONReponse implementation, will allow users to not rely on lazier response construction and can ensure that all the proper validation and encoding steps are taken. Another possibility, when helpful clients are being used, is to automatically deserialize data when requests are formatted with a proper Content-Type header.

  1. Compare performance of available serialization libraries: JDP, BlueOrigin, JKI, my own, what others? My preference is to NOT use libraries that support arbitrary object decomposition, prefer relying on a serialization interface.
  2. Assess ability to add in encoding capabilities and other security protections when used in the context of a custom web server
  3. Investigate other appropriate formats (XML? HTML?)