patternlab-php-core icon indicating copy to clipboard operation
patternlab-php-core copied to clipboard

Clean up / Normalize Parsing JSON / Yaml Data

Open sghoweri opened this issue 8 years ago • 0 comments

I was putting together a PR for more helpful JSON error messages when I noticed that we seem to have a bunch of virtually identical but still different ways of reading JSON or YAML data + checking for errors.

For example: patterninforule_php_ _untitled__workspace_

data_php_ _untitled__workspace_ pseudopatternrule_php pseudopatternrule_php_ _untitled__workspace_

@EvanLovely thoughts on trying to stick to some consistant variable names here -- maybe even just pull this chunk out into it's own function (pass the file to read in -- return the decoded data)? Could even lead to supporting other data formats if this single function got updated...

sghoweri avatar Oct 28 '17 16:10 sghoweri