Skip to content
This repository was archived by the owner on Jul 17, 2024. It is now read-only.

Commit ed227a9

Browse files
committed
Animated gif
1 parent 2847eb4 commit ed227a9

4 files changed

Lines changed: 23 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ Nuit d'\u00c9t\u00e9, \u00e7'e\u00fbt
1818

1919
Just copy/paste your text into the text box as illustrated here below and click on the `Encode` button.
2020

21-
![json_encode](images/json_encode.png)
21+
![json_encode](images/demo.gif)

images/demo.gif

31.2 KB
Loading

images/json_encode.png

-41.9 KB
Binary file not shown.

index.php

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//declare(strict_types=1);
55

66
/**
7-
* AUTHOR : AVONTURE Christophe
7+
* AUTHOR : AVONTURE Christophe.
88
*
99
* Written date : 24 october 2018
1010
*
@@ -15,7 +15,7 @@
1515

1616
$task = filter_input(INPUT_POST, 'task', FILTER_SANITIZE_STRING);
1717

18-
if ($task == 'encode') {
18+
if ('encode' == $task) {
1919
// Retrieve the JSON string
2020
$JSON = base64_decode(filter_input(INPUT_POST, 'json', FILTER_SANITIZE_STRING));
2121

@@ -28,11 +28,11 @@
2828
}
2929

3030
// Sample string; with accentuated characters and
31-
$JSON = "this is a test\n".
31+
$JSON = "this is a test\n" .
3232
"Paição São Paulo\n" .
33-
"Nuit d'Été, ç'eût\n".
34-
"(Sobre el Bé i el Mal) de Ciceró\n".
35-
"inntrykk av å være lesbar";
33+
"Nuit d'Été, ç'eût\n" .
34+
"(Sobre el Bé i el Mal) de Ciceró\n" .
35+
'inntrykk av å være lesbar';
3636

3737
// Get the GitHub corner
3838
$github = '';
@@ -68,6 +68,22 @@
6868
<div class="page-header"><h1>JSON Encode</h1></div>
6969
<div class="container">
7070
<div class="form-group">
71+
<details>
72+
<summary>How to use?</summary>
73+
74+
<div class="row">
75+
<div class="col-sm">
76+
<ul>
77+
<li>Type (or paste) a text in the text area here below</li>
78+
<li>Press the Encode button</li>
79+
</ul>
80+
</div>
81+
<div class="col-sm">
82+
<img height="300px" src="https://raw.githubusercontent.com/cavo789/json_encode/master/images/demo.gif" alt="Demo">
83+
</div>
84+
</div>
85+
</div>
86+
</details>
7187
<label for="JSON">Copy/Paste your text in the
7288
textbox below then click on the Encode button:</label>
7389
<textarea class="form-control" rows="5" id="JSON" name="JSON"><?php echo $JSON; ?></textarea>

0 commit comments

Comments
 (0)