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 8226119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:39:16+00:00 2026-06-07T15:39:16+00:00

I have a JSF grid type component where each cell is individually editable and

  • 0

I have a JSF grid type component where each cell is individually editable and the data for each cell is contained in a POJO called DataObject(DO) . The structure of DO is like this :

public class DO {

 //Id should be the coordinate. eg x@y . x is the row position and y is the column  position
 private String id;
 //This is value that goes to the client after applying formatter
 private Object value;
 //flag to indicate whether the cell will be disabled
 private boolean disabled;
 //flag to indicate whether the cell will be rendered
 private boolean rendered=true;
//Editor type for the cell
private String editorType;

}

So basically id field identifies the cell position(row and column) in the grid.

Now in our case we can have a 1000 row X 100 column grid where the grid itself is sparsely populated initially meaning that most of the cells do not contain any DO intially. So about 30% of those cells will contain data and the rest will not contain any data. I need to pass the data in JSON format from the server to the client javascript via ajax. The idea is to iterate through the collection of DO’s and construct the JSON String .

So the JSON for a grid that has data for two cells would look something like this :

{
  id1 : {
  editorType:'InputEditor',
  value:'1234123',
  disabled:'false',
  rendered:'true'
  },

 id2 : {
 editorType:'SomeCustomEditor',
 value:'23456',
 disabled:'true',
 rendered:'true'
  }
 }

What existing JSON Java library can I use here to produce this output JSON in the most efficient way ? Any example code will help here .

  • 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-07T15:39:18+00:00Added an answer on June 7, 2026 at 3:39 pm

    I have tested many (to/from) JSON parser for a very high speed messaging process, App had to send 200*100 messages per second. Since the UI was JavaScript (and websocket) — we decided to use JSON. We started with JSONObject — an it failed miserably.

    I do not have numbers off my head but here is the relative speed of these APIs:
    (fastest) Jackson > Gson >>> JSONObject (slowest)

    1. Jackson
    2. Gson
    3. JSONObject

    We planned to evaluate json-smart, but got decent performance with Jackson — so stopped. If you are on to it and planning to run a benchmark. Do include this. The only issue that we observed is this does not seem very popular, so we hesitated to use it to avoid a corner corner case failure which no body listens to.

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

Sidebar

Related Questions

I have a JSF data table <h:dataTable id=memberTable value=#{bean.pList} border=0 rowClasses=rowEven rowOdd var=item> <h:column
I have jsf application in which I have to use a facelet custom component
I have a JSF form that consists of a grid and some detail fields.
I have a JSF-managed session-scopped bean. It is also a spring component so that
I have an JSF page backed by NewsBean.java which has <f:event type=preRenderComponent listener=#{newsBean.init} />
I have a JSF 2.0 composite component as follows: <composite:interface> <composite:attribute name=id/> <composite:attribute name=action1
I have JSF code like: <h:inputText id=from value=#{fromToMBean.fromName}/> I would like to get this
Suppose i have JSF page <h:body> <h:form id=formID prependId=false> <h:outputText id=randomID value=#{randomNumber.random}/> <h:commandButton id=buttonID
I have a JSF page that is included in other JSF pages (basically a
We have a JSF 1.2 application with RichFaces 3.3.3 on JBoss 5.1. When we

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.