Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TOOL IMPROVEMENT] JSON diff formatting large values #434

Open
roland-d opened this issue Jun 5, 2023 · 1 comment
Open

[TOOL IMPROVEMENT] JSON diff formatting large values #434

roland-d opened this issue Jun 5, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@roland-d
Copy link

roland-d commented Jun 5, 2023

Describe the solution you'd like
Today I tried the JSON diff and at first it looked like nothing had happened. After looking around I found out that the diff did actually happen but just the output was suboptimal. That happens because the JSON contains some large values and that pushes everything off screen.

Example first JSON:

{
  "phpSettings": {
    "disable_functions": "getmyuid,passthru,leak,listen,diskfreespace,tmpfile,link,ignore_user_abort,shell_exec,dl,set_time_limit,exec,system,highlight_file,source,show_source,fpassthru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_open,proc_close,proc_nice,proc_terminate,escapeshellcmd,ini_alter,popen,pcntl_exec,socket_accept,socket_bind,socket_clear_error,socket_close,socket_connect,symlink,posix_geteuid,ini_alter,socket_listen,socket_create_listen,socket_read,socket_create_pair,stream_socket_server",
    "display_errors": false,
    "file_uploads": true,
    "iconv": true,
    "magic_quotes_gpc": false,
    "max_input_vars": "1000",
    "mbstring": true,
    "open_basedir": "xxxxxx",
    "output_buffering": true,
    "register_globals": false,
    "safe_mode": false,
    "session.auto_start": "0",
    "session.save_path": "",
    "short_open_tag": false,
    "xml": true,
    "zip": true,
    "zlib": true
  }
}

Example second JSON:

{
  "phpSettings": {
    "disable_functions": "",
    "display_errors": false,
    "file_uploads": true,
    "iconv": true,
    "magic_quotes_gpc": false,
    "max_input_vars": "1000",
    "mbstring": true,
    "open_basedir": "",
    "output_buffering": true,
    "register_globals": false,
    "safe_mode": false,
    "session.auto_start": "0",
    "session.save_path": "",
    "short_open_tag": false,
    "xml": true,
    "zip": true,
    "zlib": true
  }
}

This is what I see as output:
image

Additional context
I understand the issue now, as it is because of the phpSettings node but it would be nice if we can take such long values into account.

These JSONs are part of a much larger JSON but made smaller to understand it easier.

@roland-d roland-d added the enhancement New feature or request label Jun 5, 2023
@CorentinTh
Copy link
Owner

Related to #413

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
2 participants