json support

json support

Postby seb4stien » Wed Aug 14, 2013 12:55 pm


some days ago, we started a discussion about the better file format to use to publish informations about new versions of add-ons.
This took place in the pull request related to add-ons update checks : https://github.com/freeplane/freeplane/pull/23

A first implementation uses ".properties" file format (key=value separated by newlines). It's simple and natively supported by java.

Another solution would be to add json (or yaml) format support.
This could be costly to add it only for add-ons update checks.
However this could make sense if there are other needs for it.

I didn't see topics about adding json support to freeplane, but I think that some of you may have needs regarding this.
It may be a great enabler to new features related to webservices calls directly into freeplane ("dynamic nodes" or add-ons using external data).

This topic is here to collect such needs or comments :)

Posts: 32
Joined: Sat Jun 08, 2013 8:28 am

Re: json support

Postby artafinde » Wed Aug 14, 2013 1:54 pm


I'm the maintainer of the freeplane package in ArchLinux [1] and a Java developer. From what I understand on the GitHub pull request discussion [2] the updater will try to communicate with sites over HTTP protocol to retrieve information for updated versions of the add-on. The URL you will point is defined from the Add-on itself. According to Oracle Tutorials [3] "JSON is a data exchange format widely used in web services and other connected applications", so It would make sense to support JSON.
In addition the Add-on maintainer could have web service for the add-on update information which would return the information required for the add-on version (instead of a file located in a web-server).

There are various JSON libraries for Java. Some are big others small (in size) and under various licences (2-3 of them Apache Licence). If you do go ahead with Json you will need a little bit of investigation for which is more suitable for the project. My personal opinion is GSON or JSON-Simple (Both Apache Licence). JSON-Simple is very small library and I think it's more suited for the purposes just reading a small JSON Object to get some information.

Kind Regards,

[1]: https://aur.archlinux.org/packages/freeplane/
[2]: https://github.com/freeplane/freeplane/pull/23
[3]: http://docs.oracle.com/javaee/7/tutorial/doc/jsonp.htm
Posts: 5
Joined: Wed Aug 14, 2013 1:32 pm

Re: json support

Postby boercher » Mon Oct 21, 2013 10:21 pm

I agree that the json format is very common, safe and nice. But I refrained from pulling yet another external library for such a little task as [http://freeplane.sourceforge.net/wiki/index.php/How_to_publish_add-ons#Add-on_updater_support providing versioning information]. From within scripts (either Groovy or Javascript) you can use json btw.

Regards, Volker
Posts: 644
Joined: Tue Jul 26, 2011 7:13 am

Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest