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

The Archive Base Latest Questions

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

Hmm…I intended on asking only one question. But I’ve instead decided to kill two

  • 0

Hmm…I intended on asking only one question. But I’ve instead decided to kill two birds with one stone.

First Question: What does Sitebricks use as the default serializer/deserializer between Java POJOs and JSON? For example, let’s say that this is my POJO:

public class MyObject {
    private String key;
    private int value;
    public MyObject (String k, int v) {
        this.key = k;
        this.value = v;
    }
}

And this is an example of a method in my Sitebricks servlet:

@Get
public Reply<?> listPools() {
    return Reply.with(new MyObject("Foo", 6)).as(Json.class);
}

I did not annotate MyObject with any Jackson annotations, nor did I use GSON anywhere in my code. Yet, much to my surprise, I get back this as my content body in the response:

{"value":6,"key":"Foo"}

So what I would like to know is what technology or framework or what-not that Sitebricks is using by default to serialize-deserialize JSON. Jackson? GSON? Witchcraft and wizardry?

Now the Second Question. I noticed in the header that the response Content-Type was text/json. This looked weird to me because, in my past experience, I’ve always dealt with application/json as the Content-Type for JSON. This Stackoverflow post confirms my belief. Any comments on this point?

Thanks in advance!

  • 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-14T21:21:58+00:00Added an answer on June 14, 2026 at 9:21 pm

    And it’s still possible to change it on the go with the following

     return Reply.with(...).as(Json.class).type("application/json; charset=utf-8");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hmm, this may seems a simple question, but I would like to know the
I have two scripts that are identical but one works on my home testing
Hmm, sounds easy enough but after looking at the ones that come with StringTemplate,
hmm, I feel my OP title sounds wrong, but I am not sure how
Hmm.. I am not sure how to describe this. But I will try So
EDIT 1 Hmm, I accept the answers that tar respects an empty file... but
Hmm. Instead of defanging input or using some kind of regex to remove tags,
Hmm...this question may sounds silly , hope you all don't mind... If I have
[EDIT] Hmm. Perhaps this question should be titled what is the default user-input dialog
Hmm well there's lots here about this but I can't seem to get a

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.