gregglind / micropilot

Lightweight event monitoring and observation in Firefox addons.
http://gregglind.github.com/micropilot/
4 stars 2 forks source link

`watch` will json.parse passed strings. Fix #21 #32

Closed gregglind closed 11 years ago

gregglind commented 11 years ago

watch continues to grow in power and 'smarts', by attempting to JSON.parse subject and data.

record stays pure.

gregglind commented 11 years ago

@bwinton @ilanasegall

Opinions on how magical watch should be? I noticed with @bsmedberg's click data being passed around as json, that maybe we should just try to parse it. watch is already opinionated.

If y'all have other designs, I am all ears.

bwinton commented 11 years ago

I always thought of subject as a simple string. Actually, I think I'm -1 on this, since people can pass in data structures if they want to, and if they don't we probably shouldn't be trying to turn random stuff into data structures…

gregglind commented 11 years ago

After long consideration, I think I am also -1 on this. Will back this out. If people want to use data, they should use data