Commit graph

9 commits

Author SHA1 Message Date
68fe249669
Fix typo in Omitted method name
Corrected the spelling of the `Omitted` method to ensure consistency and avoid potential confusion. This change does not affect the functionality but improves code readability and accuracy.
2024-09-11 11:34:59 +02:00
7f2cf28053
Moved NewVariable to top
Moved NewVariable above the receiver methods
2024-09-11 11:26:58 +02:00
270111e53f
Reorder type declarations and JSON marshal/unmarshal methods
Moved type declarations for Nil* variables to the top for better readability and organization. JSON marshal and unmarshal methods have been repositioned towards the bottom of the file to keep related logic together.
2024-09-11 11:25:37 +02:00
61e2f10196
Refactor Variable type and add omitted status
Reorganized methods to ensure a logical method order and added the `present` field to track omitted values in JSON. This improves clarity and functionality by correctly indicating when a value was omitted.
2024-09-11 11:23:33 +02:00
05d806adff
Add JSON marshaling support for Variable types
Introduced a NewVariable function for creating generics-based Variable types. Added MarshalJSON methods to support JSON encoding for various Nil types, ensuring proper handling of nil values. Updated tests and examples to verify the new marshaling functionality.
2024-09-02 12:13:54 +02:00
1150734ab0
Remove redundant Get() method
The Get() method was simply an alias for the Value() method and did not add any functionality. This simplification makes the code cleaner and reduces unnecessary duplication, improving maintainability.
2024-09-01 21:14:46 +02:00
63c28cbb9e
Add nullable unsigned integer types
Introduced new types: NilUInt, NilUInt8, NilUInt16, NilUInt32, and NilUInt64 to support nullable unsigned integers. This enhancement aligns with existing nullable types for better consistency and flexibility.
2024-09-01 19:24:45 +02:00
4224968915
Add support for additional types in niljson
Enhanced the niljson package to include support for byte slices and float32 types. Updated the test cases to validate these new types and modified method names to be more consistent.
2024-09-01 16:41:53 +02:00
03f6fd14d1
Initial checkin 2024-09-01 16:01:58 +02:00