Added AsJson() method to create a Json object from a generic object