Json options improvements

... options()

Signed-off-by: Julien Viet <julien@julienviet.com>
should I provide an updated PR with just the previous commit ?