Fix a bug in handling of rest-json parameters.  Fixes #41.