ApiOpenSearch: Don't output warnings in JSON mode
The OpenSearch JSON format doesn't have any way to report warnings. So
by default we just drop them, but a new option will cause them to be
converted to errors instead.
Bug: T97617
Change-Id: I632bbb99a3d0f04baa5aff211fc52c3f34b13b78