Skip to content

Filter JSON delimiters from cbftp raw output - #1

Draft
Khazaztroph wants to merge 1 commit into
scriptzteam:mainfrom
Khazaztroph:agent/filter-cbftp-json-delimiters
Draft

Filter JSON delimiters from cbftp raw output#1
Khazaztroph wants to merge 1 commit into
scriptzteam:mainfrom
Khazaztroph:agent/filter-cbftp-json-delimiters

Conversation

@Khazaztroph

Copy link
Copy Markdown

What changed

  • Ignore standalone JSON object and array delimiters while parsing cbftp /raw responses.
  • Preserve brackets that are part of the actual FTP command output.

Why

The line-oriented parser treated the closing } and ] lines from a valid cbftp JSON response as command output. This displayed JSON syntax in the d-tool window. A broad bracket filter also suppresses legitimate FTP output such as SITE STAT fields, so this change only filters lines that consist solely of a delimiter after spaces are removed.

Validation

Verified with /dcb ioFTPD stat against FluxFTP's cbftp-compatible HTTPS API. The FTP response remains visible while the trailing JSON delimiters are removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant