てきとうなメモ

本の感想とか技術メモとか

PHPのjsonモジュールがDebianなどLinuxディストロからから削除される

PHP 5.2.0から入ったjsonモジュールがDebianなどのLinuxディストロから削除されるとのこと。
理由はJSONモジュールがGPLのライセンスに相反するためのようだ。

[2012-11-14 17:27 UTC] kaplan at debian dot org
Description:

                      • -

Hi,

This statement in the JSON extensions source code worries Debian about complience
with the Debian free software guide (DFSG).

It would be great to remove this paragraph as to be clean the first license
paragraph is obviously free software license.

./ext/json/utf8_to_utf16.c:The Software shall be used for Good, not Evil.
./ext/json/JSON_parser.c:The Software shall be used for Good, not Evil.
./ext/json/utf8_decode.c:The Software shall be used for Good, not Evil.
./README.REDIST.BINS:The Software shall be used for Good, not Evil.

PHPのJSONモジュールはDouglas CrockfordによるJSON Checkerを元にしている。以下はphp5.2.2のソースコードのext/json/READMEからの引用。

Two functions are implemented: encoding and decoding. The decoding
is handled by a parser based on JSON_checker[1] by Douglas Crockford.

そのため、JSONライセンスを用いなければならず、以下の一文を入れないといけない。

The Software shall be used for Good, not Evil.

The JSON License

で、これがGPLの示す自由と反するわけだ。

念の為に書いておくと、PHPソースコードから削除されたわけではなく、DebianFedoraなどが、削除したパッケージを提供するようになる。

DebianFedoraでもjson関数群を使いたい人は、PHPライセンスのpecl-json-cをインストールすることで代用することができる。