About 32,400 results
Open links in new tab
  1. Why would you use a string in JSON to represent a decimal number

    Jul 31, 2019 · If your JSON document carries decimal numbers as string, you're relying on all possible API consumers using the same number format conversion (which is a step after the JSON parsing).

  2. JSON standard - floating point numbers - Stack Overflow

    Dec 11, 2016 · While from a JSON (and JavaScript) perspective these four numerals a) 100 b) 100.0 c) 1.0E+2 d) 1E+2 are just four ways to write the exact same number, in environments where integers …

  3. What is the "right" JSON date format? - Stack Overflow

    If you have control over the generated json, for example, you provide data to other systems in json format, choosing 8601 as the date interchange format is a good choice.

  4. What is the standard for formatting currency values in JSON?

    May 15, 2015 · I've used this format in real-world applications and it proved to be a good compromise for the software I was working on. It forces the consuming code to purposefully parse the value. When …

  5. Number decimal precision with System.Text.Json

    Jan 10, 2024 · Why do you want to format data within JSON? JSON is a data exchange format. Formatting is mainly a display issue.

  6. Handling decimal values in Newtonsoft.Json - Stack Overflow

    Jun 5, 2014 · 40 You can handle both formats (the JSON number representation and the masked string format) using a custom JsonConverter class like this.

  7. Can hex format be used with JSON files? If so, how?

    JSON is agnostic about the semantics of numbers. In any programming language, there can be a variety of number types of various capacities and complements, fixed or floating, binary or decimal. That can …

  8. JSON integers: limit on size - Stack Overflow

    Nov 21, 2012 · A JSON number is not limited by the spec. Since JSON is an abstract format that is not exclusively targeted at JavaScript, the actual target environment determines the boundaries of what …

  9. JsonSerializer - serialize decimal places with 'N2' formatting

    Jul 26, 2013 · I'm serializing decimals using Newtonsoft.Json.JsonSerializer. How can I set it to serialize decimal numbers with only 1 decimal place to use 0 at the end. i.e. 3.5 serializes to "3.50"?

  10. Serialize a Double to 2 decimal places using Jackson

    I'm using Jackson, with Spring MVC, to write out some simple objects as JSON. One of the objects, has an amount property, of type Double. (I know that Double should not be used as a monetary amount.