Add a formatter to represent JSON data in human readable form

Created on 31 December 2023, 6 months ago
Updated 21 June 2024, 10 days ago
Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇷🇺Russia Chi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Chi
  • Status changed to Needs review 6 months ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 6 months ago
    17 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 4 months ago
    17 pass
  • 🇷🇺Russia Chi

    Added formatting for boolean properties.

  • 🇺🇸United States DamienMcKenna NH, USA

    This looks good, thank you!

  • First commit to issue fork.
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update about 1 month ago
    17 pass
  • 🇯🇵Japan ptmkenny

    Created MR so that this can be tested with GitLab CI. This is the patch in #3 with no changes; all credit should go to Chi.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 242s
    #183266
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update about 1 month ago
    17 pass
  • Pipeline finished with Failed
    about 1 month ago
    Total: 180s
    #183405
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update about 1 month ago
    17 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update about 1 month ago
    17 pass
  • Pipeline finished with Failed
    about 1 month ago
    Total: 261s
    #183437
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update about 1 month ago
    17 pass
  • Pipeline finished with Canceled
    about 1 month ago
    Total: 59s
    #183448
  • Pipeline finished with Failed
    about 1 month ago
    Total: 148s
    #183451
  • 🇯🇵Japan ptmkenny

    I fixed the issues identified by cspell, phpcs, and stylelint and synced the branch.

  • Status changed to Needs work about 1 month ago
  • 🇯🇵Japan ptmkenny

    Unit tests are failing on Drupal 9:

    There were 2 errors:
    1) Drupal\Tests\json_field\Kernel\PrettyElementTest::testElement
    TypeError: Argument 1 passed to Drupal\json_field\Element\JsonPretty::formatJson() must be an instance of Drupal\json_field\Element\mixed, instance of stdClass given, called in /builds/issue/json_field-3411495/src/Element/JsonPretty.php on line 31
    /builds/issue/json_field-3411495/src/Element/JsonPretty.php:40
    /builds/issue/json_field-3411495/src/Element/JsonPretty.php:31
    /builds/issue/json_field-3411495/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php:101
    /builds/issue/json_field-3411495/web/core/lib/Drupal/Core/Render/Renderer.php:788
    /builds/issue/json_field-3411495/web/core/lib/Drupal/Core/Render/Renderer.php:374
    /builds/issue/json_field-3411495/web/core/lib/Drupal/Core/Render/Renderer.php:204
    /builds/issue/json_field-3411495/web/core/lib/Drupal/Core/Render/Renderer.php:160
    /builds/issue/json_field-3411495/web/core/lib/Drupal/Core/Render/Renderer.php:580
    /builds/issue/json_field-3411495/web/core/lib/Drupal/Core/Render/Renderer.php:161
    /builds/issue/json_field-3411495/tests/src/Kernel/PrettyElementTest.php:59
    /builds/issue/json_field-3411495/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
    2) Drupal\Tests\json_field\Kernel\PrettyFormatterTest::testFormatter
    TypeError: Argument 1 passed to Drupal\json_field\Element\JsonPretty::formatJson() must be an instance of Drupal\json_field\Element\mixed, instance of stdClass given, called in /builds/issue/json_field-3411495/src/Element/JsonPretty.php on line 31
    /builds/issue/json_field-3411495/src/Element/JsonPretty.php:40
    /builds/issue/json_field-3411495/src/Element/JsonPretty.php:31
    /builds/issue/json_field-3411495/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php:101
    /builds/issue/json_field-3411495/web/core/lib/Drupal/Core/Render/Renderer.php:788
    /builds/issue/json_field-3411495/web/core/lib/Drupal/Core/Render/Renderer.php:374
    /builds/issue/json_field-3411495/web/core/lib/Drupal/Core/Render/Renderer.php:446
    /builds/issue/json_field-3411495/web/core/lib/Drupal/Core/Render/Renderer.php:446
    /builds/issue/json_field-3411495/web/core/lib/Drupal/Core/Render/Renderer.php:204
    /builds/issue/json_field-3411495/web/core/lib/Drupal/Core/Render/Renderer.php:160
    /builds/issue/json_field-3411495/web/core/lib/Drupal/Core/Render/Renderer.php:580
    /builds/issue/json_field-3411495/web/core/lib/Drupal/Core/Render/Renderer.php:161
    /builds/issue/json_field-3411495/tests/src/Kernel/PrettyFormatterTest.php:36
    /builds/issue/json_field-3411495/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
    ERRORS!
    Tests: 17, Assertions: 96, Errors: 2.
    
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 24 days ago
    17 pass
  • Status changed to Needs review 24 days ago
  • 🇺🇸United States DamienMcKenna NH, USA

    I removed the "mixed" argument type and added docs to the method, hopefully it'll work now.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 24 days ago
    17 pass
  • Status changed to Fixed 24 days ago
  • 🇺🇸United States DamienMcKenna NH, USA

    Committed. Thanks everyone!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024