When attempting to use REST API POST/PUT the following 400 error is received: "Json doc specified is either not supported or invalid!".
The server is configured via a cache.xml and the regions defined are defined as PERSISTENT (REPLICATE_PERSISTENT, PARTITION_PERSISTENT, etc..). The server is started using gfsh with the HTTP REST API flags:
start server --name=server1 --J=-Dgemfire.start-dev-rest-api=true
The REST framework introduec in GemFire 8 uses PDX under the covers. When PDX is used on a persistent region then the PDX metadata itself also needs to be persistent. This is enabled with the cache.xml element: <pdx persistent="true"/>.
Use the new persistent configuration framework which is also introduced in GemFire 8. This configuration is by the locator. When new members join the cluster, they will receive the configuration and apply that on startup.
To solve the issue do the following steps:
1. Start up a locator
2. Using gfsh, execute 'configure pdx --disk-store'
3. Start up a server, pointing at the running locator. This will apply the PDX config including the pdx persistent = true.
More info on persistent configuration can be found in here