JSONAlchemy: improve tests and bug fix

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>