Comment 1 for bug 1870055

Revision history for this message
Michał Sawicz (saviq) wrote :

I managed to reproduce this, but have no real solution just yet…

The error is quite unhelpful:

$ ./capnp convert json:binary src/capnp/compiler/../compat/json-test.capnp TestJsonAnnotations -Isrc/capnp/compiler/../.. < ./src/capnp/testdata/annotated.json
/root/capnproto-0.7.0/.libs/capnp convert: The input is not in "json" format. It looks like it is in "json" format. Try that instead.
Try '/root/capnproto-0.7.0/.libs/capnp convert --help' for more information.

It's complaining about https://github.com/capnproto/capnproto/blob/master/c%2B%2B/src/capnp/testdata/annotated.json, which is obviously valid json, and the "reverse" test works fine:

./capnp convert binary:json src/capnp/compiler/../compat/json-test.capnp TestJsonAnnotations -Isrc/capnp/compiler/../.. < ./src/capnp/testdata/annotated-json.binary