Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cbor http API #4313

Open
magik6k opened this issue Oct 17, 2017 · 1 comment
Open

Cbor http API #4313

magik6k opened this issue Oct 17, 2017 · 1 comment
Labels
need/analysis Needs further analysis before proceeding

Comments

@magik6k
Copy link
Member

magik6k commented Oct 17, 2017

Currently the HTTP API only really supports JSON. Having Cbor API would be useful for js-ipfs-api (mainly for api.dag.*, see #3771), we could use https://github.com/polydawn/refmt to make some things easier/cleaner.

This is blocked on #3856

@ec1oud
Copy link

ec1oud commented Dec 12, 2020

Yes please! And #3856 is done.

ec1oud added a commit to ec1oud/ipfs-tsdb that referenced this issue Dec 15, 2020
This is silly, converting to JSON and then parsing it.
So far IPFS HTTP API can't give us CBOR directly:
ipfs/kubo#4313
ec1oud added a commit to ec1oud/ipfs-tsdb that referenced this issue Dec 15, 2020
The trouble is github.com/ferristseng/rust-ipfs-api does not offer
dag_put with cbor: ferristseng/rust-ipfs-api#63
only JSON; and serde_json won't let us sneak a byte array into a string
value either, because Rust expects strings to always be valid UTF-8.

It would probably be a dead end anyway because of
ipfs/kubo#4313 : there's no way to
read back CBOR data via the http API, so I couldn't write the select
function.
ec1oud added a commit to ec1oud/ipfs-tsdb that referenced this issue Dec 15, 2020
This is silly, converting to JSON and then parsing it.
So far IPFS HTTP API can't give us CBOR directly:
ipfs/kubo#4313
ec1oud added a commit to ec1oud/ipfs-tsdb that referenced this issue Dec 15, 2020
The trouble is github.com/ferristseng/rust-ipfs-api does not offer
dag_put with cbor: ferristseng/rust-ipfs-api#63
only JSON; and serde_json won't let us sneak a byte array into a string
value either, because Rust expects strings to always be valid UTF-8.

It would probably be a dead end anyway because of
ipfs/kubo#4313 : there's no way to
read back CBOR data via the http API, so I couldn't write the select
function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/analysis Needs further analysis before proceeding
Projects
None yet
Development

No branches or pull requests

3 participants