Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Suppress 'null' values from going into the variable list

Author DaveJarvis <email>
Date 2025-08-22 19:44:39 GMT-0700
Commit 5de7647206eaf923eae89aac988373bcd2709a23
Parent 6855c99
src/main/java/com/keenwrite/cmdline/Arguments.java
final var keyName = format( "%s.%s", parent, node.getKey() );
- if( jsonNode.isValueNode() ) {
+ if( jsonNode.isNull() ) {
+ map.put( keyName.substring( 1 ), "" );
+ }
+ else if( jsonNode.isValueNode() ) {
// Trim the leading period, which is always present.
map.put( keyName.substring( 1 ), node.getValue().asText() );
Delta 4 lines added, 1 line removed, 3-line increase