Dagobert Michelsen wrote:
Hi,
Hi
my initial reaction: the current format is just a tweaked LDIF. LDIF itself is still a more compact format than JSON. I personally am opposed to adding any JSON dependencies to our code base. Anyone else have an opinion?
I have made some enhancements to back-sock to use JSON for the passed data and JSON-RPC to map LDAP calls to method invocations. The function signatures of the JSON-RPC calls are modeled to be similar to the ones used in json2ldap (which does just the opposite direction to talk LDAP via JSON-RPC) [1]. The previous hand-crafted format passed on the socket was harder to parse and needed a manually built parser whereas now a standard library can be used. However, handling the JSON data structures now imposes an additional dependency to Jansson (a JSON access library in C) [2]. Jansson itself is leightweight and has no dependencies itself. Due to the limited use of back-sock and the enhanced ease of use I think it would be acceptable to add this dependency.
I would be glad if the modification would be possible to be applied to OpenLDAP and I happily submit a patch.
Best regards
-- Dago
[1] JSON2LDAP interface from JSON-RPC to LDAP http://connect2id.com/products/json2ldap/web-api#ldap-compare
[2] Jansson, a C library for reading and writing JSON data structures http://www.digip.org/jansson/