Dennis
ff612b867c
Merge pull request #10732 from dlang/stable
...
Merge stable
2025-04-02 13:43:44 +02:00
Vladimir Panteleev
6beff688d2
std.json: Add JSONValue.toHash
...
Allows using JSON values in sets and map keys.
2025-03-22 17:38:24 +00:00
Martin Kinkelin
cafe864533
std.json: Avoid setting union members, set the whole union instead ( #10683 )
...
To work around https://github.com/dlang/dmd/issues/20675 .
2025-03-17 22:24:14 +08:00
Iain Buclaw
d53b5636b2
std.json: Void initialize return value in emptyOrderedObject ( #10617 )
...
Works around issue seen in dlang/dmd#20675 .
2025-01-11 05:51:56 +08:00
Vladiwostok
231ae8b68a
Fix D-Scanner linting issues ( #9070 )
...
* Fix UndocumentedDeclarationCheck linting issue
* Fix IfConstraintsIndentCheck linting issue
* Address feedback
* Fix publictests CI
* Fix old (libdparse) D-Scanner linting warn
2024-10-27 01:21:56 -07:00
Vladimir Panteleev
800dd75234
Move ordered object indication into a new bool
...
Avoid breaking code that do "final switch" oven JSONType.
2024-10-21 22:31:58 +00:00
Vladimir Panteleev
dfb9db4004
Fix Bugzilla 24823 - std.json: Allow optionally preserving the order of fields in JSON objects
2024-10-21 11:41:24 +00:00
Dennis
d5780aa8f5
std.json: Document opEquals
( #8975 )
...
Co-authored-by: Dennis Korpel <dennis@sarc.nl>
2024-07-19 10:52:14 +03:00
Jeremy Baxter
f31a7bc41d
replace dead links
...
for link in $(grep -Eor 'https?://[^\\)", ]+' | grep -v dlang.org \
| grep -Eo 'https?://.+'); do (printf "%s: " "$link"; curl -Is "$link" \
| head -n1) | grep -E '4..$'; done
for link in $(grep -Eor '\\$\\(HTTP .+, ' | grep -v dlang.org \
| cut -d' ' -f2- | sed 's/, .*$//'); do out="$(curl -Is "$link")"; \
(! [ $? = 0 ] || printf '%s' "$out" | head -n1 | grep -Eq '4..') \
&& printf '%s\\n' "$link"; done
2024-07-14 15:16:11 +12:00
Jeremy
4203847ad6
Improve documentation in std.json
2023-09-10 16:59:21 +12:00
Mathis Beer
2649d6fe1b
Add warning to std.json that it doesn't play well with the GC.
...
Production experience as well as synthetic tests have shown that std.json's use of associative arrays combined with GC issues causes heavy heap fragmentation. Furthermore, its heavy GC usage makes it unperformant in a threaded environment.
Despite this, people keep using std.json for production workloads, then being disappointed when it doesn't measure up. So let's warn them upfront.
2023-07-04 12:24:25 +02:00
Jeremy
3c74c2b88a
Add an introduction to the std.json documentation, fix some mistakes in std.curl and replace broken links in std.stdio ( #8724 )
...
* Fix some mistakes in curl.d
* Add an introduction for std.json
* Fix more documentation in curl.d
* Fix broken links in std.stdio documentation
2023-03-21 11:01:15 +02:00
Andrew Lalis
2f8dd14f8d
Add emptyObject() and emptyArray() functions to std/json ( #8559 )
...
* Added emptyObject() and emptyArray() functions, and tests for them.
2023-03-09 15:28:55 +08:00
Nick Treleaven
281f42d306
Fix missing unittests in docs ( #8603 )
...
* Fix missing staticArray unittest in docs
Found using https://github.com/dlang/dmd/pull/14527 .
* Fix missing FloatRep and DoubleRep unittests in docs
* 2 JSONValue op overloads
* std.random
* detabber
* remove
* std.digest.murmurhash
2022-10-17 05:43:13 +08:00
Walter Bright
6b01031cb1
Update std/json.d
...
Co-authored-by: Dennis <dkorpel@users.noreply.github.com>
2022-08-12 08:36:12 -07:00
Walter Bright
c14a7e0368
replace delegate with simple nested function
2022-08-12 07:00:42 -07:00
Dennis Korpel
5636c8cdcc
Fix incorrect return scope
annotations
2022-03-22 18:08:31 +00:00
WebFreak001
dac59a4bde
add isSomeFiniteCharInputRange as simplification
...
combines the very common constraint
`isInputRange!R && !isInfinite!R && isSomeChar!(ElementEncodingType!R)`
and adds a bunch of documentation with examples for users to understand
it better. This should lower the neccessary needed technical insight to
read basic docs, especially std.path and std.file docs.
2022-01-15 18:38:52 +01:00
dkorpel
ea76f45494
Use return scope
instead of just return
2021-11-26 17:03:06 +01:00
dkorpel
cd7389266e
Add explicit return
to inout
functions
2021-11-16 23:22:33 +00:00
giacomo.ratto00
1c57bbd58f
indent with spaces
2021-08-28 19:52:28 +02:00
giacomo.ratto00
66c84669c0
Make JSONValue.opBinaryRight!"in" inout
2021-08-28 19:25:28 +02:00
Atila Neves
815a718c81
Fix static assert message in std.json
2021-06-08 15:12:25 +00:00
nordlow
450e79cd6a
Annotate std/json.d to please dlang/dmd#12520
2021-05-18 11:02:18 +02:00
berni44
b2019ebab0
Narrow imports of std.math in the rest of phobos.
2021-04-21 03:00:57 +02:00
berni44
189a646286
Fix Issue 16432 - JSON incorrectly parses to string
2021-03-22 14:13:25 +01:00
berni44
6f2a0934a7
Adapt imports of std.format to new structure of std.format.
2021-03-19 13:22:00 +01:00
Crom (Thibaut CHARLES)
de28a13d54
Better wording & removed useless import
2020-12-03 19:42:10 +02:00
Crom (Thibaut CHARLES)
54c56ecb09
use std.conv.to to check for overflows
2020-12-03 19:42:10 +02:00
Crom (Thibaut CHARLES)
61a2fdd8f5
Add some conversions to JSONValue.get!T
2020-12-03 19:42:10 +02:00
Nathan Sashihara
453faadf5b
Replace is(Unqual!T == Unqual!U) with is(immutable T == immutable U) for speed & memory usage
2020-08-03 15:07:32 +02:00
MoonlightSentinel
d816788da4
Fix Issue 20874 - std.json.assign requires '@safe' and 'pure'
2020-05-28 23:35:27 +02:00
Geod24
04f3979317
Replace 'Issue XXX' with Bugzilla links
...
Make the links clickable, as was done in the DMD repository.
Also avoids any ambiguity w.r.t. where the issue is stored.
2020-04-13 16:28:09 +09:00
aG0aep6G
9a91156f87
DRY
2020-03-10 02:40:07 +01:00
aG0aep6G
0bd2fa4334
mark access to value.store.str
as @trusted
...
When issue 20655 ("attribute inference accepts unsafe union access as
@safe") is fixed, DMD correctly complains about the operation being unsafe.
2020-03-10 01:44:28 +01:00
Steven Schveighoffer
dbd4a2c0a5
Fix issue 20527. Set the correct union member for integers so CTFE
...
doesn't get confused.
2020-01-23 08:32:50 -05:00
Mathis Beer
3e26069a4f
Fix issue 20511: make toJSON infer safeness based on output range safeness.
2020-01-17 06:26:51 +01:00
Martin Nowak
1589503ca0
Merge remote-tracking branch 'upstream/stable' into merge_stable
2019-12-16 10:52:16 +01:00
GrimMaple
8793b093bc
Add get!(T) getter to std.json
2019-11-17 02:34:17 +03:00
Carsten Schlote
1479200267
Enhanced deprecation message on JSON_TYPE alias
...
Add hint to message to also change the enum members.
2019-11-03 11:39:29 +01:00
Carsten Schlote
ae03972df1
Fix Issue 20350 - Undeprecate JSONType member to avoid deprecation warnings
...
Undeprecate JSONType members, which create lots of spam-like
deprecation warnings, which can't be fixed by the user.
See discussion on this issue at
https://forum.dlang.org/post/feudrhtxkaxxscwhhhff@forum.dlang.org
2019-11-03 11:39:12 +01:00
Robert Schadek
057d7ed326
Issue20330 json toString with OutRange
...
more style
2019-10-30 08:37:26 +00:00
Atila Neves
4cfef68d61
Replace in
with const
in preparation of dmd change
...
Changing dmd to implement `in` meaning `scope const` when DIP1000 is
selected causes Phobos to fail to compile. This changes Phobos in
preparation for that change.
2019-10-23 12:41:35 +02:00
Robert Schadek
53aa79c235
std_json allow trailing comma
...
* changelog
* annotate unittest
* with check for strict parsing
* tabs
2019-06-14 10:49:22 +01:00
Flying-Toast
11ebb6474b
remove deprecated stuff in std.json
2019-05-18 21:23:42 -04:00
The Dlang Bot
76ef073df3
Merge pull request #6726 from FeepingCreature/fix/Issue-19297-handle-jsonvalue-signed-unsigned-comparison
...
Fix issue 19297: handle comparison of signed, unsigned and floating JSONValues as in D
merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>
2018-10-16 14:57:03 +02:00
Mathis Beer
b07b215424
Fix issue 19297: handle comparison of signed, unsigned and floating JSONValues
2018-10-11 10:47:28 +02:00
The Dlang Bot
3e3c65d9b9
Merge pull request #6682 from Erikvv/feature/json-boolean-getter-setter
...
Add a getter and setter for booleans in JSON
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2018-08-28 11:07:03 +02:00
Erik van Velzen
1992afb4b1
Remove inout for JSON getters of value types
2018-08-27 20:50:35 -04:00
Erik van Velzen
8e8409f308
Add a getter and setter for booleans in JSON
2018-08-27 20:54:32 +02:00