legacy-knowledge-base
公開されました Sep. 10, 2025

Liferay API を使用して JSON オブジェクトに長い値を追加すると、二重引用符で囲まれた文字列が返されます

written-by

Roberto Díaz

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

Environment

  • ライフレイ DXP 7.0.0+

解決策

  • これは予期される動作です。

    チケットで動作の変更が発生します https://issues.liferay.com/browse/LPS-59156. そのメソッドに 9,007,199,254,740,992 より大きい値を送信することに関連する問題を解決します。 これらのケースでは、精度が失われました (詳細については https://issues.liferay.com/browse/LPS-58586 を参照して)。

    これは、長い値が JavaScript でサポートされている数値よりも大きくなる可能性があり、結果として数値の精度が失われるために発生します。

    たとえば、答えが 9,007,199,254,740,993 の場合、ブラウザは 9,007,199,254,740,992 を読み取ることができます。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base