Add comparasion for rcl vs jansson.
Fix some issues in jansson memory management.