json-bigint icon indicating copy to clipboard operation
json-bigint copied to clipboard

Proposal for json-bigint Adaptation in OpenHarmony

Open Haoc-xytx opened this issue 8 months ago • 0 comments

Title: Proposal for json-bigint Adaptation in OpenHarmony

Background

OpenHarmony is an open-source project incubated and operated by the OpenAtom Foundation. Its goal is to build a smart terminal device operating system framework and platform aimed at all scenarios, full connectivity, and intelligence.

OpenHarmony uses JavaScript to develop native desktop applications, particularly suitable for building lightweight, cross-device application interfaces and interaction logic. The feature of "develop once, run on multiple devices" is expected to attract more JS developers, promoting the explosive growth of lightweight IoT applications. For teams familiar with frontend technologies, OpenHarmony + JS is undoubtedly an efficient path into the all-scenario intelligent ecosystem.

json-bigint is a processing library that allows the use of BigInts to parse and stringify JSON based on json.js and bignumber.js, addressing issues with large integers. For applications requiring the handling of large integers (such as financial systems, data analysis tools, etc.), json-bigint provides a reliable method to ensure data accuracy, which is crucial for data integrity and application reliability.

Currently, json-bigint has been widely used in the field of mobile application development on OpenHarmony. We believe this provides an excellent opportunity to further expand the user base of json-bigint.

We will submit the adaptation code via pull request (PR) as soon as possible. Creating this Issue aims to initiate an in-depth discussion with the community regarding the incorporation of the adaptation code. We sincerely welcome your valuable suggestions.

The first PR we hope to add installation instructions under the OpenHarmony development environment in the project README, along with hyperlinks pointing to OpenHarmony development cases, aiming to draw more attention from frontend developers to the OpenHarmony system. Subsequently, during the usage by OpenHarmony community developers, upon discovering defects or identifying new common requirements, we will actively provide feedback and contribute back to the json-bigint project.

We will also continue to participate in the json-bigint community and provide technical support for using json-bigint on OpenHarmony.

Adaptation Plan

We have completed the adaptation of json-bigint for OpenHarmony, with specific contents as follows:

These adaptation measures, while retaining all original functionalities of json-bigint, further enhance its unique value within the OpenHarmony ecosystem.

Test Results

We conducted unit tests on json-bigint using the original library test cases under the OpenHarmony system.

Verified versions include:

  • DevEco Studio: NEXT Beta1-5.0.3.806, SDK: API12 Release(5.0.0.66)
  • DevEco Studio: 4.0(4.0.3.512), SDK: API10(4.0.10.9)
  • DevEco Studio: 3.2Release(3.1.3.400),OpenHarmony SDK: API9 Release(3.2.11.5).
  • DevEco Studio: 4.1 Release (4.1.0.400), SDK: API 11 Release (4.1.7.5).

Coverage of unit test cases is as follows:

Interface Name Passed Notes
jsonBigint() pass
parse() pass
stringify() pass

If needed, we can provide detailed test reports at any time.

Benefits to Upstream Community

  • Reach a vast user base and developer community of OpenHarmony.
  • Ensure long-term development potential by supporting cutting-edge operating system trends.
  • Enhance the project's capability to handle diverse runtime environments.

Labels

Enhancement, Compatibility, Cross-platform

Haoc-xytx avatar Apr 22 '25 10:04 Haoc-xytx