weburg / generic-http-web-service-server-java

An example server providing the Web service and an HTML-only static client
http://www.weburg.com/ghowst
GNU General Public License v3.0
0 stars 0 forks source link

Supported nested objects beyond the root level #3

Open wweburg opened 1 month ago

wweburg commented 1 month ago

Nested objects aren't yet supported, only objects at the root level that map to the resource. Adding support for nested objects shouldn't be too hard. It should be possible to detect JSON in the values of the fields and automatically encode/decode at the server and client.

wweburg commented 3 weeks ago

Note: nested field names in JSON serializations won't automatically map to local language format field names (e.g. this_field vs. thisField). Each JSON parser and encoder will need to be looked at to see what if anything can be mapped by the library as far as names. Otherwise, writing a manual mapper to rename things would be tedious. This is already somewhat required by C as it is, and would get worse. Options are

  1. to just not supported nested objects,
  2. require clients to just accept server language field name convention,
  3. see what if anything can be easily renamed by library (unlikely to be supported in any library)