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

  • SEARCH
  • Home
  • 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 9086369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:28:21+00:00 2026-06-16T21:28:21+00:00

I am new for sencha touch. I need to pass json data by using

  • 0

I am new for sencha touch. I need to pass json data by using RESTful architectural .But I dun has any Idea how to start it.Can anyone guild me some example? Btw I am using JACKSON library.

Here is my java file – jsonTest.java

    package jsonTest;

import java.io.File;
import java.io.IOException;
import java.util.Map;

import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;



import org.codehaus.jackson.JsonEncoding;
import org.codehaus.jackson.JsonFactory;
import org.codehaus.jackson.JsonGenerationException;
import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;

import com.sun.xml.internal.bind.api.TypeReference;



public class jsonTest {

      private static List<String> countries;
        private static List<String> tags;

         public static void main(String[] args) {

            String data = "Afghanistan, Albania, Algeria, Andorra, Angola, Antigua & Deps,"+ 
                    "United Kingdom,United States,Uruguay,Uzbekistan,Vanuatu,Vatican City,Venezuela,Vietnam,Yemen,Zambia,Zimbabwe";

            countries = new ArrayList<String>();
            StringTokenizer st = new StringTokenizer(data, ",");

            //Parse the country CSV list and set as Array
            while(st.hasMoreTokens()) {
                countries.add(st.nextToken().trim());
            }

            String strTags = "SharePoint, Spring, Struts, Java, JQuery, ASP, PHP, JavaScript, MySQL, ASP, .NET";
            tags = new ArrayList<String>();
            StringTokenizer st2 = new StringTokenizer(strTags, ",");

            //Parse the tags CSV list and set as Array
            while(st2.hasMoreTokens()) {
                tags.add(st2.nextToken().trim());
            }

        }

        public List<String> getCountryList(String query) {

            String country = null;
            query = query.toLowerCase();
            List<String> matched = new ArrayList<String>();
            for(int i=0; i < countries.size(); i++) {
                country = countries.get(i).toLowerCase();
                if(country.startsWith(query)) {
                    matched.add(countries.get(i));
                }
            }
            return matched;
        }

        public List<String> getTechList(String query) {
            String country = null;
            query = query.toLowerCase();
            List<String> matched = new ArrayList<String>();
            for(int i=0; i < tags.size(); i++) {
                country = tags.get(i).toLowerCase();
                if(country.startsWith(query)) {
                    matched.add(tags.get(i));
                }
            }
            return matched;
        }

}

How can I show the result to my sencha touch project?By using list or panel?

  • 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-06-16T21:28:23+00:00Added an answer on June 16, 2026 at 9:28 pm

    I would recommend using JAX-RS for developing the web service. Specifically, as I have worked with Jersey, it supports POJO Mapping i.e. your web service can return a POJO (Plain Old Java Object) which Jersey can implicitly convert into JSON.

    Here’s a working example from mkyong’s website for POJO Mapping and JSON with Jersey.

    PS: I have no experience in working with sencha Touch and hence can’t help much with that.

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

Sidebar

Related Questions

I am new for sencha touch. I need to add , update a data
I am new to Sencha Touch framework. I need to load some data from
I'm new to Sencha Touch, and I need to create a form where you
When using the [relatively new] MVC bits in Sencha Touch I find that 90%
I'm new to sencha touch.I wrote code for number keypad,but the buttons are displayed
I am new for sencha touch. I need to set the font size of
I am new to sencha touch can any one help me, what is the
Here is my Sencha Touch 2 code which shows the JSON list data in
I am new to sencha touch mvc framework and i am using version1.1.1 on
I'll begin with the usual disclaimer: new to Sencha Touch/working with JSON, floundering in

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.