|
1 |
| -@page "~/jwt-decoder" |
| 1 | +@page "~/jwt-decoder" |
2 | 2 | @model IdentityServerHost.Pages.Home.JwtDecoder
|
3 | 3 |
|
4 | 4 | <div class="jwt-decoder-page">
|
|
478 | 478 | });
|
479 | 479 | contents.append(`<span class="json-object-end">}${(isLastItem ? '' : ',')}</span>`);
|
480 | 480 | } else if (typeof value === 'string') {
|
481 |
| - const text = JSON.stringify(value) + (isLastItem ? '' : ','); |
| 481 | + const text = JSON.stringify(value); |
482 | 482 | contents.text(text);
|
483 | 483 | contents.addClass('json-string');
|
| 484 | + if (!isLastItem) { |
| 485 | + contents.append('<span class="json-structure">,</span>'); |
| 486 | + } |
484 | 487 | } else if (typeof value === 'number') {
|
485 |
| - const text = value + (isLastItem ? '' : ','); |
| 488 | + const text = value; |
486 | 489 | contents.text(text);
|
487 | 490 | contents.addClass('json-number');
|
| 491 | + if (!isLastItem) { |
| 492 | + contents.append('<span class="json-structure">,</span>'); |
| 493 | + } |
488 | 494 | } else if (typeof value === 'boolean') {
|
489 |
| - const text = (value ? 'true' : 'false') + (isLastItem ? '' : ','); |
| 495 | + const text = value ? 'true' : 'false'; |
490 | 496 | contents.text(text);
|
491 | 497 | contents.addClass('json-boolean');
|
| 498 | + if (!isLastItem) { |
| 499 | + contents.append('<span class="json-structure">,</span>'); |
| 500 | + } |
492 | 501 | } else {
|
493 |
| - const text = String(value) + (isLastItem ? '' : ','); |
| 502 | + const text = String(value); |
494 | 503 | contents.text(text);
|
495 | 504 | contents.addClass('json-unknown');
|
| 505 | + if (!isLastItem) { |
| 506 | + contents.append('<span class="json-structure">,</span>'); |
| 507 | + } |
496 | 508 | }
|
497 | 509 |
|
498 | 510 | if (options.explainClaims && key && explain) {
|
|
0 commit comments