I have started building an application in Spring Boot and have written a couple of services that use the Blockfrost API with no issue however the AssetService getAsset method returns:
[Request processing failed; nested exception is io.blockfrost.sdk.api.exception.APIException: Error getting asset] with root cause
com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `java.lang.String` from Array value (token `JsonToken.START_ARRAY`)
at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 1, column: 539] (through reference chain: io.blockfrost.sdk.api.model.Asset["onchain_metadata"]->java.util.LinkedHashMap["files"])
at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59) ~[jackson-databind-2.13.1.jar:2.13.1]
on some of the assets and also this on others:
com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `java.lang.String` from Object value (token `JsonToken.START_OBJECT`)
at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 1, column: 576] (through reference chain: io.blockfrost.sdk.api.model.Asset["onchain_metadata"]->java.util.LinkedHashMap["attributes"])
To get to this stage I have followed the docs to do the following:
Use the AddressService to get the asset <Lovelace or concatenation of asset policy_id and hex-encoded asset_name> from one of the unit keys in the response.
I believe that the asset returned by the address query is the exact same asset required by the asset endpoint but please let me know if I've misunderstood.
I have started building an application in Spring Boot and have written a couple of services that use the Blockfrost API with no issue however the AssetService
getAsset
method returns:on some of the assets and also this on others:
To get to this stage I have followed the docs to do the following:
Use the AddressService to get the asset
<Lovelace or concatenation of asset policy_id and hex-encoded asset_name>
from one of theunit
keys in the response.Then tried to pass that as the
asset
following the examples here: https://docs.blockfrost.io/#tag/Cardano-Assets/paths/~1assets~1{asset}/getI believe that the asset returned by the address query is the exact same asset required by the asset endpoint but please let me know if I've misunderstood.