libgdx/libgdx — pull request #1571 by Senth (2014-03-28 08:11:00+00:00)
Title: Simple 'remove comments from JSON' functionality in Skin & SkinLoader

**Problem**
Under multiple times I've wanted to add comments to the JSON skin file. Why? 1) To add headlines; 2) Add simple description of UI elements, although these are not as necessary; 3) Comments for variables, such as what do the Float bar_above_below_height do, where is it used?

Currently we (me and my designer) are using google docs to document each variable, what it does etc. This is quite a lot of duplicate work and it's cumbersome to just look-up the variable, what it does, and its value. As these three attributes are stored in two different files.

An easier approach would be to document the variable inside the JSON file.

**Proposed solution**
I've changed Skin and SkinLoader to remove all comments in the JSON file before sending it to the parser, but only if the functionality is wanted. I.e. I've added another constructor to SkinLoader and a new method to Skin. These works just as before if the user doesn't make use of these methods.

**Possible enhancement**
Creating new constructors for Skin that takes a boolean (much like new SkinLoader constructor). More efficient wrapper for removing JSON comments.

**Thoughts**
I'm not sure on the naming of the variables and methods. I also see this as a first draft and suggestion. I've implemented things as simple and understandable as I could, thus they might not be the most efficient.