You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
👋 I'm using xcall with Bear's x-callback-url scheme, documented here.
Mostly this is working great, but with one exception: Where Bear's x-success contains nested JSON objects, for example the todo action (which returns an array of objects), xcall fails to properly JSON encode this data.
Example
# search for a todo containing 'hereismytodo'
xcall -url "bear://x-callback-url/todo?token=$BEAR_TOKEN&search=hereismytodo"
Returns the following (note how the notes property is a JSON escaped string):
queryItem.value may contain a JSON-encoded value (as is the case with Bear's /todox-success callback value) which should first be parsed before being added to items[queryItem.name]. If this fails, then as a fallback, just the pure queryItem.value should be added.
👋 I'm using
xcall
with Bear'sx-callback-url
scheme, documented here.Mostly this is working great, but with one exception: Where Bear's
x-success
contains nested JSON objects, for example thetodo
action (which returns an array of objects),xcall
fails to properly JSON encode this data.Example
Returns the following (note how the
notes
property is a JSON escaped string):Instead, the following should be returned:
It looks like the source of the issue is in
jsonStringFromQueryItems
, where it appears to assume the object is a simple set of key/value pairs:xcall/xcall/AppDelegate.m
Lines 111 to 122 in 0d61fea
I would love to PR this, but I'm not familiar with Objective-C 🤔
/cc @pr1mal -- wondering if you've seen this / can provide guidance given your work in #6 🙇
The text was updated successfully, but these errors were encountered: