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

Error: No JSON object could be decoded #20

Open
BenSwansea opened this issue Aug 5, 2016 · 1 comment
Open

Error: No JSON object could be decoded #20

BenSwansea opened this issue Aug 5, 2016 · 1 comment

Comments

@BenSwansea
Copy link

BenSwansea commented Aug 5, 2016

I get the above error message when trying to run the file. This is my config.json file but i removed the twitter keys

Made a stupid mistake? Also how would I tweet @plusnethelp as well as @plusnet ?

"{
"twitter": {
"twitterToken": "",
"twitterConsumerKey": "",
"twitterTokenSecret": "",
"twitterConsumerSecret": ""
},
"tweetTo": "@plusnet",
"internetSpeed": "40",
"tweetThresholds": {
"10": [
"Hey {tweetTo} I'm paying for {internetSpeed}Mb/s but getting only {downloadResult} Mb/s?!? Sort it Out.",
],
"20": [
"Hey {tweetTo} why am I only getting {downloadResult}Mb/s when I pay for {internetSpeed}Mb/s? Not Great!"
],
"36": [
"Well {tweetTo} Well {downloadResult}Mb/s is a start, but I should have {internetSpeed}Mb/s"
]
},
"log": {
"type": "csv",
"files": {
"ping": "pingresults.csv",
"speed": "speedrestuls.csv"
}
}
}
"

@cosmickatamari
Copy link

I know this is old but not sure if you've fixed it. Use an online JSON validation here: http://jsonlint.com/

This is what my code ended up looking like:

{
"twitter": {
"twitterToken": "1583282600-",
"twitterConsumerKey": "",
"twitterTokenSecret": "",
"twitterConsumerSecret": ""
},

"tweetTo": "@coxcomm",
"internetSpeed": "50",

"tweetThresholds": {
	"5": ["So {tweetTo} ... for $56/month I expect better than {downloadResult}Mbit/s when I'm paying for {internetSpeed}Mbit/$. I hope I'm getting a HUGE discount?"],
	"25": ["Hey {tweetTo} why am I only getting {downloadResult}Mb/s when I pay for {internetSpeed}Mb/s? $56+/month for this$. I'll only pay half this month. :)"],
	"40": ["Well {tweetTo} I guess {downloadResult}Mb/s is better than nothing, still not worth $56/month when I expect {internetSpeed}Mb/s."]
},

"log": {
	"type": "csv",
	"files": {
		"ping": "../log/pingresults.csv",
		"speed": "../log/speedresults.csv"
	}
}

}

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

2 participants