@@ -162,17 +162,15 @@ Both encoder and decoder fully conform to [RFC 8259](https://tools.ietf.org/html
162
162
163
163
Encoding can be done via ` JSON.encode!/1 ` and ` JSON.encode_to_iodata!/1 ` functions. The default encoding rules are applied as follows:
164
164
165
- | ** Elixir** | ** JSON** |
166
- | ------------------------| ----------|
167
- | ` integer() \| float() ` | Number |
168
- | ` true \| false ` | Boolean |
169
- | ` nil ` | Null |
170
- | ` binary() ` | String |
171
- | ` atom() ` | String |
172
- | ` list() ` | Array |
173
- | ` %{binary() => _} ` | Object |
174
- | ` %{atom() => _} ` | Object |
175
- | ` %{integer() => _} ` | Object |
165
+ | ** Elixir** | ** JSON** |
166
+ | -----------------------------| ----------|
167
+ | ` integer() \| float() ` | Number |
168
+ | ` true \| false ` | Boolean |
169
+ | ` nil ` | Null |
170
+ | ` binary() ` | String |
171
+ | ` atom() ` | String |
172
+ | ` list() ` | Array |
173
+ | ` %{String.Chars.t() => _} ` | Object |
176
174
177
175
You may also implement the ` JSON.Encoder ` protocol for custom data structures. Elixir already implements the protocol for all Calendar types.
178
176
@@ -225,6 +223,36 @@ You may also prefer to write using guards:
225
223
226
224
def foo(x, y, z) when x == y and y == z
227
225
226
+ ## v1.18.3 (2025-03-06)
227
+
228
+ ### 1. Enhancements
229
+
230
+ #### Elixir
231
+
232
+ * [ JSON] Encode any JSON key to string
233
+ * [ Kernel] Allow ` <<_::3*8>> ` in typespecs
234
+
235
+ #### Mix
236
+
237
+ * [ mix loadpaths] Support ` --no-listeners ` option
238
+
239
+ ### 2. Bug fixes
240
+
241
+ #### Elixir
242
+
243
+ * [ CLI] Fix ` --no-color ` not setting ` :ansi_enabled ` to false
244
+ * [ Protocol] Return correct implementation for an invalid struct pointing to ` nil `
245
+ * [ Stream] Do not raise when ` Stream.cycle/1 ` is explicitly halted
246
+
247
+ #### ExUnit
248
+
249
+ * [ ExUnit.Diff] Fix regression when diffing nested improper lists
250
+
251
+ #### IEx
252
+
253
+ * [ IEx.Autocomplete] Fix autocomplete crash when expanding struct with ` __MODULE__ `
254
+ * [ IEx.Helpers] Do not purge on ` recompile ` if IEx is not running
255
+
228
256
## v1.18.2 (2025-01-22)
229
257
230
258
### 1. Enhancements
0 commit comments