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

JSON export fails #20

Closed
serghei-topor opened this issue May 21, 2017 · 1 comment
Closed

JSON export fails #20

serghei-topor opened this issue May 21, 2017 · 1 comment

Comments

@serghei-topor
Copy link

serghei-topor commented May 21, 2017

Hi, I'm getting an exception trying to convert data to JSON format

mi = Mediainfo.new '/tmp/sample.mp4'
puts mi.to_json

ActiveSupport::JSON::Encoding::CircularReferenceError: object references itself

thanks

@serghei-topor
Copy link
Author

serghei-topor commented May 22, 2017

Solution is:

mi = Mediainfo.new '/tmp/sample.mp4'
Hash.from_xml(mi.raw_response).to_json

For me it works

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

No branches or pull requests

1 participant