# ----------------------------------------------------------------------- # Copyright © 2012 ShepHertz Technologies Pvt Ltd. All rights reserved. # ----------------------------------------------------------------------- require 'json/pure' require 'App42_Ruby_API/App42ResponseBuilder' require 'imageProcessor/Image' module App42 module ImageProcessor # # # ImageProcessResponseBuilder class converts the JSON response retrieved from # the server to the value object i.e Image # # class ImageProcessorResponseBuilder < App42ResponseBuilder # # Converts the response in JSON format to the value object i.e Image # # @param json # - response in JSON format # # @return Image object filled with json data # # def buildResponse(json) imageJSONObj = getServiceJSONObject("image", json) imageObj = Image.new imageObj.strResponse=json imageObj.isResponseSuccess= isResponseSuccess(json) buildObjectFromJSONTree(imageObj, imageJSONObj); return imageObj end end end end