Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6206051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:22:50+00:00 2026-05-24T05:22:50+00:00

I used to do all XML with XStream, but now due to deprecation I’m

  • 0

I used to do all XML with XStream, but now due to deprecation I’m forced to switch to JSON for two APIs, one of which is a Google API. Since there’s this google-api-java-client that should work well on Android and allows to do this in a record number of very few lines of code, I’m probably going to use this.

Yaniv’s Google I/O 2011 presentation is still ringing in my ear:

This library is basically designed for any API on the Web. … Why would you want to use a different library with one vendor, and a different library for another vendor? Ideally, you’d like a library that would work with pretty much any API and have a consistent experience.

True. So here’s my question: How can I reuse parts of this library for similar but non-Google APIs and make my life easier? Does anyone have any experience with this, or code samples?

The other API uses JSON. I’m talking about very simple REST calls that anonymously get data (i.e. no API keys or OAuth). No advanced stuff. I’d be happy to build my own model classes and of course realize they’d not be available. I’m probably an intermediate level developer when it comes to REST. I’ll be using two different transport methods, and two different JSON parsers, based on Android SDK level.

Edit: Yup, implementing the client for the Google API was a breeze, except for wrestling with the new quota limits.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T05:22:51+00:00Added an answer on May 24, 2026 at 5:22 am

    It’s hard to say which components you can reuse and how you can reuse without having seen the API 🙂

    I’d probably start by pointing the client directly at the new API and inspecting what breaks. If after digging around with the debugger the problems do not look too bad, I’d tweak the client as necessary.

    However, if you’re really just reading from a simple rest API, you may not find a whole lot of benefit from attempting to reuse the Google client. An HTTP client combined with a JSON parser like Jackson may be sufficient and less complex.

    ~~Jenny

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Which all parsers are used in Android for XML parsing? Right now I know
In the Android SDK documentation, all of the examples used with the @drawable/my_image xml
I found similar topics but they all used absolute positioning which placed the canvases
I've created an Engine which is basically used for all of our projects. Now
I have this XML file: http://www.basket.ba/ksbih/xml/200_07.xml I've used all the major functions and classes
Untill now I used soap4r as my SOAP-client with Ruby 1.8.x, but now I
I have used all the Standard Network related code for Getting Images of about
I have a logger class that is used all across my application, both in
I use RenderAction to render a partial that is used all over my site.
which javascript framework can be used for all browsers

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.