first working json encoder of sqlalchemy results