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

The Archive Base Latest Questions

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

Here in my Java Jersey Rest service, for an update method, the value money

  • 0

Here in my Java Jersey Rest service, for an update method, the value “money” is represented as long in server. And valid values are between 30.00 and 500.00

Which one is more standart approach? should I force the client to send money value as 30.00 with a dot and parse manually in server than make it double/long. Or sent as 3000 and parse that way. Or there is already a way to this in java/jerseylibrary.

@PUT
@Path("/money")
@Consumes("text/plain)
public void updateThreshold(String threshold) {

*//check value and update in server*
}

note: I don’t want to use parametrized requests to set parameter type as double

  • 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-16T20:21:18+00:00Added an answer on June 16, 2026 at 8:21 pm

    It will be much easier to save all data in cents. Its avoid you from some possible problems with rounding, and different data formats (in such countries used ‘,’ as separator, in other ‘.’), Also storing and sorting by int value in DB more better too.

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

Sidebar

Related Questions

I'm writing a REST service using Jersey Java and Tomcat. Here's my question -
I am trying to connect to SQL Server 2008 server from Java here is
I'm using the Jersey Client library to run tests against a rest service running
I have a JAX-RS REST service implemented using Jersey. One of the cool features
I'm trying to deserialize some JSON with Jersey/Jackson in Java. Here is an example
I have to use an interface in my REST web service. Here is the
I am running a Jersey REST service. The POJO's which represent my resources are
I am trying to use extjs store to talk to a Jersey rest Java
New to Jersey(REST Framework for Java) and I'm trying to setup two resources, in
BACKGROUND: I have a REST API implemented in Java using Jersey. My API uses

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.