Meh looking at it again, seems like it runs the json parsing when you call the function so it's 6 of 1 half a dozen really. I'd say keep it the way you've written it if that's all it does actually.