Files
xrpl-dev-portal/content/_snippets/string-number-formatting.ja.md
2023-11-29 00:15:52 +09:00

9 lines
899 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

XRP LedgerのAPIでは、[XRP](what-is-xrp.html)と[トークン](tokens.html)の両方で、通貨の金額を数値で表現するために、JSONのネイティブの数値ではなく文字列を使用します。これは、JSONパーサーが自動的にすべてのJSON数値を浮動小数点形式で表現しようとする可能性がある場合に、精度の低下を防ぐためです。String値の中では、数値はネイティブのJSON数値と同じ方法で処理されます。
* 10進数
* ゼロの接頭辞なし
* 小数点として`.`を含むことができます。例えば、½は`0.5`と表されます
* 負の金額は`-`から始まります
* `E`または`e`は10の累乗科学的記数法を表します。例えば`1.2E5`は1.2×10<sup>5</sup>つまり`120000`と同じです。負の指数も可能です。
* カンマ(`,`)は使用しません。