Legacy Knowledge Base
Published Sep. 10, 2025

When adding long values to a JSON object using the Liferay API a String with double quotes is being returned

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

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

Environment

  • Liferay DXP 7.0.0+

Resolution

  • This is the expected behavior.

    The behavior change occurs in the ticket https://issues.liferay.com/browse/LPS-59156. It solves an issue related with sending values ​​to that method greater than 9,007,199,254,740,992. In these cases there was a loss of precision (see https://issues.liferay.com/browse/LPS-58586 for more details).

    This happens because long values ​​can be greater than the numeric values supported by JavaScript, and the number loses precision as a result.

    For example, if the answer is 9,007,199,254,740,993 the browser could read 9,007,199,254,740,992.

Additional Information

 

 

 

Did this article resolve your issue ?

Legacy Knowledge Base