1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Suggestion Include JSON/Apache Http libraries in the client

Discussion in 'Client & Site Suggestions' started by Exile, Aug 19, 2014.

  1. Exile

    Joined:
    Jul 24, 2014
    Messages:
    188
    Likes Received:
    23
    Can these please be included in the client?

    JSON: http://json.org/java/
    Apache Http: http://hc.apache.org/httpcomponents-client-ga/index.html

    It's actually a shame that Java doesn't have native JSON support, because JSON is used in almost every webservice you can think of. The HttpClient from Apache is optional, but is a nice "replacement" for the default HttpUrlConnection stuff.

    I need JSON to communicate with a set of webservices that I'm implementing in all my scripts bots soon, if this can't get included in the client then I will include them in all my scripts bots seperately, but it's cleaner and loads faster if it does get included.
     
  2. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,937
    Likes Received:
    1,266
    Tagging @Cloud and proposing a modification to the suggestion: adding Gson as a cloud library. This would mean the dev would specify the library dependency in their XML manifest (similar to Maven) and the client would download (and cache) it at first runtime.
     
  3. Exile

    Joined:
    Jul 24, 2014
    Messages:
    188
    Likes Received:
    23
    Sounds exactly what I want :)
     
  4. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    The client already supports this, it was just disabled because the compiler isn't setup to support them yet.
     
  5. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,937
    Likes Received:
    1,266
    I know. I was explaining for everyone else's sake, not ours. :p What I am now asking is that we re-implement it into the compiler and re-enable.
     
    Exile likes this.
  6. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    It's not something that's easy to maintain and it requires so work on the clients front end because the first time it downloads some of these libs, they're 20+ megabytes and a strange idle while it does that is obviously a bad idea.
     
  7. Exile

    Joined:
    Jul 24, 2014
    Messages:
    188
    Likes Received:
    23
    For now on I'm only including the JSON files that I actually need ;)
     
  8. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,937
    Likes Received:
    1,266
    We could easily re-use our LoadingDialog we show at the beginning to serve this purpose.
     
  9. Exile

    Joined:
    Jul 24, 2014
    Messages:
    188
    Likes Received:
    23
    Well I basically bypassed it this way, and it's working as it should too ;)

    Included the org.json package in my svn, and used the default java.net packages as a replacement for Apache Http ;)
    The JSON package only is about 500kb.
     
  10. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    And I hated you for it because I had to review every line in the package.
     
  11. Exile

    Joined:
    Jul 24, 2014
    Messages:
    188
    Likes Received:
    23
    I know you love me <3
     

Share This Page

Loading...