We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
using
I have a some Records used for Decoding:
record AddressTransactionsResponse { result : Array(Kajiki.Transaction), status : String } record Kajiki.Sender { address : String, publicKey : String using "public_key", amount : Number, fee : Number, signr : String using "sign_r", signs : String using "sign_s" } record Kajiki.Recipient { address : String, amount : Number } record Kajiki.Transaction { id : String, action : String, senders : Array(Kajiki.Sender), recipients : Array(Kajiki.Recipient), message : String, token : String, prevHash : String using "prev_hash", timestamp : Number, scaled : Number }
and then using it:
json = Json.parse(response.body) |> Maybe.toResult("Json parsing error") item = decode json as TransactionResponse txn = item.result next {transaction1 = Maybe.just(txn) } } catch Http.ErrorResponse => error { next { error = "Could not retrieve remote wallet information" } } catch String => error { next { error = "Could not parse json response" } } catch Object.Error => error { next { error = "could not decode json" } }
the json looks fine - but it cannot decode. Instead I get a cryptic javascript error in the console saying
ReferenceError: $$Kajiki is not defined at Function.$$AddressTransactionsResponse.decode (index.js:34460) at index.js:37451
the catch lines don't catch anything. this was working fine with from so I suspect it's a bug with using
from
The text was updated successfully, but these errors were encountered:
I found a workaround for this now - which is to not separate the record names with dots: so
Kajiki.Transaction becomes KajikiTransaction etc
Kajiki.Transaction
KajikiTransaction
I don't know if this behaviour is intended - but it was working before the update.
Sorry, something went wrong.
Thanks for reporting! Fixed by 477c629
gdotdesign
No branches or pull requests
I have a some Records used for Decoding:
and then using it:
the json looks fine - but it cannot decode. Instead I get a cryptic javascript error in the console saying
the catch lines don't catch anything. this was working fine with
from
so I suspect it's a bug withusing
The text was updated successfully, but these errors were encountered: