SomMeri / less4j

Less language is an extension of css and less4j compiles it into regular css. Less adds several dynamic features into css: variables, expressions, nested rules, and so on. Less was designed to be compatible with css and any correct css file is also correct less file.
145 stars 47 forks source link

Create a packaged version that can be used for evil (no json.org license) #326

Closed theogimonde closed 8 years ago

theogimonde commented 8 years ago

Currently the packaged version of less4j seems to include json.org code, which requires a no-evil notice when distributed: http://www.json.org/license.html. This makes it impossible to redistribute the packaged less4j with software that should be possible to use for evil, unless you tediously convince yourself that your usage is not covered by the json.org license. (See https://wiki.debian.org/qa.debian.org/jsonevil for a discussion of the issue.)

It would be more convenient if the packaged less4j did not contain any json.org code.

Also it would be useful if the README.md file contained a section about third-party licenses included in the packaged version.

SomMeri commented 8 years ago

Json is used only in tests, not in library itself. Is it a problem in that case too? In any case, I would accept evil friendly pull request (in case you need it faster).

theogimonde commented 8 years ago

Thanks for the response! The test code usage of org.json code is unfortunately enough to make it a hard sell with those picky about licenses.

One possible fix would be to replace org.json with an alternative JSON processing library with a more palatable license. I explored three different evil-compatible JSON libraries:

Feel free to pick your poison from either of these branches, or let me know if you would prefer a pull request for one of them. The invalid JSON was an extra comma in two test mapdata files. Those test files have been fixed as needed, but less4j would no longer handle these kinds of JSON errors if gson or javax.json were used. (json-simple was more forgiving in this regard.)

My favorite of the three libraries, after this small coding session, would be gson.

SomMeri commented 8 years ago

Wow, thank you. I think that gson sounds the best. I think that if you send pull request from your repo, github should give you attribution for that. If you don't care about it, I will send pull request from your repo before release - commit will be yours, but github history slightly different.

In any case, this will go into the next release - either next week or after #325. If you need it faster let me know and I will release within a day.