Giter Site home page Giter Site logo

No more JSON output ? about pgoapi HOT 6 CLOSED

tejado avatar tejado commented on September 14, 2024
No more JSON output ?

from pgoapi.

Comments (6)

tejado avatar tejado commented on September 14, 2024

The output was never JSON but a dict. As the dict now contains some binary data, it is uncompatible with JSON as this is not a native type of it. Please use pprint like in my pokecli.py :)

from pgoapi.

drallieiv avatar drallieiv commented on September 14, 2024

The thing is that I was parsing the output in Javascript (with a JSON.parse()) to display it nicely in html.

I tried using the pprint format, but I haven't found any library than can reads it, and do not plan on making my own.

from pgoapi.

tejado avatar tejado commented on September 14, 2024

A recursive function which will decode all bytes of the dict could be a solution. Then JSON.dump can be used again.

from pgoapi.

tejado avatar tejado commented on September 14, 2024

@drallieiv Did you found a solution?

from pgoapi.

drallieiv avatar drallieiv commented on September 14, 2024

@tejado I'm still using an older version of the project with the previous protofiles.

from pgoapi.

tejado avatar tejado commented on September 14, 2024

I added an JSONByteEncoder ebffcdb which should resolve your issue.

Example:
https://github.com/tejado/pgoapi/blob/master/pokecli.py#L163

from pgoapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.