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

JSONParse Exception #170

Open
karanrajpal14 opened this issue Apr 18, 2022 · 1 comment
Open

JSONParse Exception #170

karanrajpal14 opened this issue Apr 18, 2022 · 1 comment
Assignees

Comments

@karanrajpal14
Copy link

Hello,

I'm unable to get this to work on my MBP running Big Sur.
Despite providing a working config which I picked up from one of your examples from the tutorial here

I see this error when I run the program against my config:

❯ goku -c ~/.config/karabiner/karabiner.edn
Exception in thread "main" com.fasterxml.jackson.core.JsonParseException: Unexpected character ('{' (code 123)): was expecting double-quote to start field name
 at [Source: (PushbackReader); line: 15, column: 8]
	at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1840)
	at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:712)
	at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:637)
	at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddName(ReaderBasedJsonParser.java:1782)
	at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:708)
	at cheshire.parse$parse_STAR_.invokeStatic(parse.clj:65)
	at cheshire.parse$parse_STAR_.invoke(parse.clj:63)
	at cheshire.parse$parse_STAR_.invokeStatic(parse.clj:65)
	at cheshire.parse$parse_STAR_.invoke(parse.clj:63)
	at cheshire.parse$parse_STAR_.invokeStatic(parse.clj:66)
	at cheshire.parse$parse_STAR_.invoke(parse.clj:63)
	at cheshire.parse$parse_STAR_.invokeStatic(parse.clj:65)
	at cheshire.parse$parse_STAR_.invoke(parse.clj:63)
	at cheshire.parse$parse.invokeStatic(parse.clj:100)
	at cheshire.parse$parse.invoke(parse.clj:88)
	at cheshire.core$parse_stream.invokeStatic(core.clj:252)
	at cheshire.core$parse_stream.invoke(core.clj:234)
	at cheshire.core$parse_stream.invokeStatic(core.clj:249)
	at cheshire.core$parse_stream.invoke(core.clj:234)
	at karabiner_configurator.misc$load_json.invokeStatic(misc.clj:60)
	at karabiner_configurator.misc$load_json.invoke(misc.clj:56)
	at karabiner_configurator.core$update_to_karabiner_json.invokeStatic(core.clj:99)
	at karabiner_configurator.core$update_to_karabiner_json.doInvoke(core.clj:95)
	at clojure.lang.RestFn.invoke(RestFn.java:439)
	at karabiner_configurator.core$parse.invokeStatic(core.clj:150)
	at karabiner_configurator.core$parse.doInvoke(core.clj:142)
	at clojure.lang.RestFn.invoke(RestFn.java:439)
	at karabiner_configurator.core$_main.invokeStatic(core.clj:239)
	at karabiner_configurator.core$_main.doInvoke(core.clj:234)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at karabiner_configurator.core.main(Unknown Source)
^C

And this is what my karabiner.edn file looks like:

;; main contains multiple manipulators
;; each manipulator has a description and multiple rules

;; main                -> {:main [{:des "..." :rules [rule1 rule2 ...]}]}
;; manipulator         -> {:des "..." :rules [rule1 rule2 ...]}
;; manipulator's rules -> [rule1 rule2 ...]
{:main [{:des "a to 1, b to 2, c to insert 1 2 3"
         :rules [[:a :1] [:b :2] [:c [:1 :2 :3]]]}]}

;; or we can separate them into three manipulators
{:main [{:des "a to 1" :rules [[:a :1]]}
        {:des "b to 2" :rules [[:b :2]]}
        {:des "c to insert 123" :rules [[:c [:1 :2 :3]]]}]}

;; in rules [:a :1] -- [<from> <to>]
;; it means from key a to key 1
;; these keycode is just original karabiner keycode prefix with colon

I'm unsure about what I'm doing wrong here. Would you please help me out?
Thank you!

@nikitajz
Copy link

Just started looking into Goku and came across a similar issue even on simple examples.

It might be an actual bug in the app.
I've noticed that tests actually don't fail in CI, despite having failures
https://github.com/yqrashawn/GokuRakuJoudo/actions/runs/5920932689/job/16052838243

tests screenshots

image

image

@yqrashawn not sure if you still maintain it, but would be great if you could take a look at it (along with fixing the version mismatch #194). Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants