class App42::ImageProcessor::ImageProcessorResponseBuilder

ImageProcessResponseBuilder class converts the JSON response retrieved from the server to the value object i.e Image

Public Instance Methods

buildResponse(json) click to toggle source

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

# File lib/imageProcessor/ImageProcessorResponseBuilder.rb, line 29
def buildResponse(json)
  imageJSONObj = getServiceJSONObject("image", json)
  imageObj = Image.new
  imageObj.strResponse=json
  imageObj.isResponseSuccess= isResponseSuccess(json)
  buildObjectFromJSONTree(imageObj, imageJSONObj);
  return imageObj
end