Export the session also as JSON to use it with some web services