Skip to content

libubox: add convenience function for adding anonymous strings to array container #4

Open
@pprindeville

Description

@pprindeville

It's handy to have unnamed strings in array containers, such as network.lan.ports[] in /etc/board.json.

Please add a convenience function to support this, such as:

json_add_anon_string() {
        local cur
        _json_get_var cur JSON_CUR
        _json_add_generic string "" "$1" "$cur"
}

Not sure if it's worth adding a check to see if the cursor is currently in an array or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions