andreasgrill / auto-selfcontrol

Small utility to schedule start and stop times of SelfControl
MIT License
305 stars 37 forks source link

No JSON object could be decoded #31

Open beerco666 opened 6 years ago

beerco666 commented 6 years ago

Really struggling with this every time I change my schedule. I've read the other issue like this and even copy pasted the code in the previous thread and it still didn't work. Tried the JSON editor online and it looked like I'm good.

Any Ideas?

{ "username": "TheNewMe", "selfcontrol-path": "/Applications/SelfControl.app", "host-blacklist": [ "Facebook.com", "www.quora.com" ], "block-schedules": [ { "weekday": 1, "start-hour": 6, "start-minute": 0, "end-hour": 12, "end-minute": 0 }, { "weekday": 2, "start-hour": 6, "start-minute": 0, "end-hour": 12, "end-minute": 0 }, { "weekday": 3, "start-hour": 6, "start-minute": 0, "end-hour": 12, "end-minute": 0 }, { "weekday": 4, "start-hour": 6, "start-minute": 0, "end-hour": 12, "end-minute": 0 }, { "weekday": 5, "start-hour": 6, "start-minute": 0, "end-hour": 12, "end-minute": 0 } ] }

beerco666 commented 6 years ago

I think I got it to work. I was using exetendscript toolkit (which was somehow the default for me - have no idea as I never write anything and know practically nothing about modern code development) to edit and it apparently was adding something to the file that I couldn't see. I cut and pasted this to textedit into a new plain text document and saved it again and it worked.

Looking in the directory, config.json now shows up as plain text instead of JSON in the file type.

AIRHASKI commented 4 years ago

exetendscript toolkit

Could manage it to work still same problem. Can you explain how to solve it. I tried copying the script. and creating new config document