Added json encoder to searpc object