What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Run aontu vet schema.aon data.json, then use the reported data path and finding to identify what disagrees with the schema. For the documented exact-decimal case, Aontu rejects a JSON number when the schema expects bigdecimal rather than silently coercing a value that may already have lost precision during JSON parsing. Carry fixed-scale decimals as constrained strings and parse them into an exact decimal type only after validation.
Run validation and locate the failure
The Aontu guide demonstrates vetting a data file against a schema with aontu vet invoice.aon invoice.json. A successful check prints verdict: valid. Rejected data prints verdict: invalid, followed by a finding that identifies a path such as $.invoice.total, a finding category, and the relevant data and schema details. The guide’s shell example returns exit status 1 for invalid data. Aontu describes the purpose of the tool as combining data, schemas, and defaults into a consistent result or reporting where they conflict (Aontu package documentation).
As an Amazon Associate I earn from qualifying purchases.
- Run
aontu vet schema.aon data.json, substituting your schema and data filenames. - Read the reported path first. Use it to find the specific value in the input document.
- Compare the actual value and the schema details shown in the finding. Determine whether the conflict is about the value’s type or scalar, or whether it violates a constraint.
- Correct the data or schema deliberately, then run the same command again to confirm the result.
Do not respond to every failure by converting the value. A conversion can change its meaning, and the finding tells you what property actually failed.
Distinguish a type mismatch from a constraint failure
The guide demonstrates two different failures. A JSON number supplied where the schema requires bigdecimal produces a scalar-unification conflict, shown in the example as no_scalar_unify. A string can satisfy a string type and still fail a constraint: in the guide’s two-decimal example, "19.9" is text but does not match the required scale pattern.
#1 Best Overall
- Type or scalar-unification conflict: the value does not meet the schema’s required type or scalar, as with the demonstrated JSON number and
bigdecimal. - Constraint failure: the value has the expected type but fails an additional rule, as with the one-decimal string against a two-decimal pattern.
These are examples, not a complete catalog of Aontu finding categories. Follow the specific finding and expected-versus-actual details printed for your data.
Why the documented JSON number is not coerced to an exact decimal
In the official example, the JSON parser has already represented a number as a binary64 floating-point value by the time Aontu validates it. That representation may no longer preserve the exact decimal digits originally written in the JSON. Aontu therefore rejects the value when the schema requires bigdecimal, rather than certifying a potentially altered decimal as exact. The Aontu guide calls this refusal a feature: a schema should not admit a value after the wire representation has already lost the exactness the schema promises.
This explains the documented JSON-number-to-bigdecimal path; it is not a complete coercion policy for every Aontu type or input format. The available guide does not establish that all Aontu mismatches are handled this way.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Represent fixed-scale decimals as constrained JSON strings
For an exact fixed-scale decimal crossing JSON, send the digits as a JSON string, for example "19.99", instead of as the number 19.99. In the schema, require both type: string and a regular-expression constraint for the intended decimal form and scale. The type restriction rejects a bare JSON number; the pattern can reject malformed text or a string with the wrong number of fractional digits. In the guide’s example, "19.99" passes the two-decimal pattern and "19.9" does not.
Rank #3
The guide also shows a fuller pattern: define a reusable decimal-string type, package the amount with its currency, and use an optional constant conversion mark such as bigdecimal:2 to identify the leaf and intended scale. Making the mark constant prevents the data from substituting a different conversion preference, such as float. After validation succeeds, parse the string with an exact decimal implementation; the guide names TypeScript’s Decimal class and Go’s math/big as examples. Do not use parseFloat when exact decimal arithmetic is required.
Choose the JSON representation based on what must be preserved
| Representation | Exact decimal digits | Type and scale checks | Consumer handling |
|---|---|---|---|
| JSON number | In the documented Aontu case, parsing may convert it to binary64 and lose exact decimal representation. | It does not satisfy the demonstrated exact bigdecimal schema. |
Aontu rejects that documented mismatch instead of coercing it into an exact decimal. |
| Constrained decimal string | Carries the decimal digits as text across the JSON boundary. | A string type check rejects non-strings; a pattern can enforce the required scale and spelling. | Validate first, then parse with an exact decimal implementation. |
Use a JSON number when the value is ordinary numeric data and exact decimal spelling is not the contract. Use a constrained string when the digits and fixed scale are part of the contract, as in the guide’s money example.
Rank #4
Keep currency and display scale explicit
A decimal value alone does not necessarily retain the original number of fractional digits. The guide notes that 0d10.50 and 0d10.5 are equal values and that canonical output uses the shorter representation. If an application must display two fractional digits, format the validated amount using its declared scale; do not expect the numeric value to reveal whether the input originally ended in zero. For monetary data, keep the currency alongside the amount so the amount’s unit is part of the data contract.
Free tools Windows power users keep installed
One-click scans. No signup required.
Implementation scope
Aontu’s package documentation describes TypeScript as its canonical implementation and Go as a port that mirrors core unification semantics (Aontu package documentation). The Go API material names verdicts valid, invalid, incomplete, and error (Go API documentation). Those verdict labels do not establish that every diagnostic string or detail is identical across TypeScript and Go releases. Consult the documentation for the implementation and version you use when relying on details beyond the demonstrated examples.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




