These are chat archives for ractivejs/ractive

Jan 2016
Bjorn Neergaard
Jan 20 2016 05:06
hey there
anyone know how ractive parses json in attributes?
I have a case where JSON is not being parse when it should be -- I get a string back, minus the commas
Martin Kolárik
Jan 20 2016 10:39
@neersighted can you post the attribute here?
Bjorn Neergaard
Jan 20 2016 14:23
@MartinKolarik I think I figured it out
there is a greater underlying issue with commas in 0.7.3
I have some components where a reference to a certain variable means a comma is dropped and thus ractive parses the attribute as a string
and in some {{yield}} directives in components, commas are being eaten
look over the code if you'd like, this guy is writing a ractive component for my project and has commas being eaten
the paticular attribute in question is
<ui-button params='{"id_tag": "{{id_tag}}", "pressure": "custom"}'
replacing id_tag with a static string/number or pressure with a reference solves it
ui-button is a component
there's too much going on behind the scences to totally isolate it, as it only happens in some components; but I'll try to create a reduced test case on jsfiddle