Invalid JSON on rule export

I tried to export a Rule Machine 5.1 app to JSON and it seems the resulting JSON is not valid, the jq utility reports an invalid literal.

When opened in an editor it too shows the error at this enum:

"type":"enum", "value":"[\\"Events\\",\\"Triggers\\",\\"Actions\\"]"}

It does the same with another, similar rule, at the same enum.

The output is not guaranteed to be valid JSON and is not intended for editing, so there is no reason to open it. If you import or restore the app from this file, it should work. If that doesn't (and you didn't edit it), that could be a problem, but I don't think that will apply to your case.

1 Like

I don't think is ever a good idea to export something that resembles JSON but it's not a valid JSON: the moment your JSON parser routine changes, gets updated or fixed, you are screwed.
It's also very strange that any standard JSON generator would do it, unless it was manually written from scratch (which I guarantee it will bite someday).

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.