Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix map fieldtype issue #33

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

minsikzzang
Copy link

@minsikzzang minsikzzang commented Nov 22, 2017

module FacebookAds
  module FieldTypes
    class Object < Base
...  
      def deserialize(value, session = nil)
        value.is_a?(String) ? JSON.parse(value) : value
      end		    
...

API response is JSON format data, and it's already decoded in APIResponse class, so value in deserialize method always should be hash format (decoded JSON object / hash). Somehow If it receives string value from API server, still needs to be parsed.

@minsikzzang
Copy link
Author

@alanho please let me know if you have any comment / feedback,
Thanks

@minsikzzang
Copy link
Author

any feedback or plan for merge @alanho ?

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alanho has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@antonkey
Copy link

+1. I applied the patch in my project and waiting for this PR to be merged

@yokuba
Copy link

yokuba commented Feb 9, 2018

+1. Patch worked for me.

@nicolascochin
Copy link

+1 Also worked for me

@Micka33
Copy link

Micka33 commented Feb 19, 2018

+1 also worked for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants