September 29, 2016
On 09/28/2016 05:40 PM, Szabo Bogdan wrote:
>
> How about Json... there is something that is stopping the D community to
> move the `vibe.data.json` to `phobos`?
>

Why does it need to be in phobos? It's already usable as-is. Only libraries within a std lib are valid?

September 29, 2016
On Thursday, 29 September 2016 at 14:46:10 UTC, Nick Sabalausky wrote:
> On 09/28/2016 05:40 PM, Szabo Bogdan wrote:
>>
>> How about Json... there is something that is stopping the D community to
>> move the `vibe.data.json` to `phobos`?
>>
>
> Why does it need to be in phobos? It's already usable as-is. Only libraries within a std lib are valid?

Well... the json format can be used in a lot of cases not only for the web and I think it does not make much sense to include a web framework in order to use this format.  Since it a a general purpose format, I don't see why it could not be included in phobos.  Phobos has already a json library, which is barely usable. I guess that a lot of people are using the vibe.d's json instead of the one from Phobos.

Anyway... right now vibe.d it's split in sub packages and I can include only the data package if I need it... I'm asking because it would be nice if there would be a json structure in Phobos with an interface at least as good as the one from vibe.


September 29, 2016
On Thursday, 29 September 2016 at 20:14:27 UTC, Szabo Bogdan wrote:
> On Thursday, 29 September 2016 at 14:46:10 UTC, Nick Sabalausky wrote:
>> [...]
>
> Well... the json format can be used in a lot of cases not only for the web and I think it does not make much sense to include a web framework in order to use this format.  Since it a a general purpose format, I don't see why it could not be included in phobos.  Phobos has already a json library, which is barely usable. I guess that a lot of people are using the vibe.d's json instead of the one from Phobos.
>
> Anyway... right now vibe.d it's split in sub packages and I can include only the data package if I need it... I'm asking because it would be nice if there would be a json structure in Phobos with an interface at least as good as the one from vibe.

It's not as if it were the only json library though, asdf for example isn't linked to any web framework https://github.com/tamediadigital/asdf
September 29, 2016
On 09/29/2016 04:14 PM, Szabo Bogdan wrote:
> On Thursday, 29 September 2016 at 14:46:10 UTC, Nick Sabalausky wrote:
>> On 09/28/2016 05:40 PM, Szabo Bogdan wrote:
>>>
>>> How about Json... there is something that is stopping the D community to
>>> move the `vibe.data.json` to `phobos`?
>>>
>>
>> Why does it need to be in phobos? It's already usable as-is. Only
>> libraries within a std lib are valid?
>
> Well... the json format can be used in a lot of cases not only for the
> web and I think it does not make much sense to include a web framework
> in order to use this format.

You don't have to USE the web framework stuff to the use json part.

This sort of question has come up before, but I've really never understood the problem. Sounds more ideologic than anything real to me.

September 30, 2016
On Friday, 30 September 2016 at 03:27:36 UTC, Nick Sabalausky wrote:
> You don't have to USE the web framework stuff to the use json part.
>
> This sort of question has come up before, but I've really never understood the problem. Sounds more ideologic than anything real to me.

Since Vibe has been split into subpackages it's not an issue anymore, but before that I copied Vibe's Json code into my project so I didn't need to depend on the entire Vibe codebase.

DMD ICE's are much, much less frequent than they were a few years ago, but with largish projects I still regularly run into them, which is a reason for me to not include more code than necessary.
September 30, 2016
On Thursday, 29 September 2016 at 21:32:03 UTC, cym13 wrote:

>
> It's not as if it were the only json library though, asdf for example isn't linked to any web framework https://github.com/tamediadigital/asdf

I like the name `asdf` (it's the same I type when I need random text input). Is there a tutorial / blog / article about it? Maybe it needs more promotion. For the moment it says:
`
! Currently all ASDF Method names and all UDAs are in DRAFT state, we might want want make them simpler. Please submit an Issue if you have input.
! ASDF is currently only very loosely validating jsons and with certain functions even silently and on purpose ignoring failing Objects (see below).
`

So not sure, if it's 100% usable.
September 30, 2016
On Friday, 30 September 2016 at 09:41:55 UTC, Chris wrote:
> On Thursday, 29 September 2016 at 21:32:03 UTC, cym13 wrote:
>
>>
>> It's not as if it were the only json library though, asdf for example isn't linked to any web framework https://github.com/tamediadigital/asdf
>
> I like the name `asdf` (it's the same I type when I need random text input). Is there a tutorial / blog / article about it? Maybe it needs more promotion. For the moment it says:
> `
> ! Currently all ASDF Method names and all UDAs are in DRAFT state, we might want want make them simpler. Please submit an Issue if you have input.
> ! ASDF is currently only very loosely validating jsons and with certain functions even silently and on purpose ignoring failing Objects (see below).
> `
>
> So not sure, if it's 100% usable.

Not sure dmd's 100% usable either but that doesn't mean I'm just ignoring it ;) My point was just that there are alternatives and that as much as I'd like to see a new JSON lib in phobos a non-standard library is still a library.
September 30, 2016
On Friday, 30 September 2016 at 18:04:32 UTC, cym13 wrote:
> On Friday, 30 September 2016 at 09:41:55 UTC, Chris wrote:
>> [...]
>
> Not sure dmd's 100% usable either but that doesn't mean I'm just ignoring it ;) My point was just that there are alternatives and that as much as I'd like to see a new JSON lib in phobos a non-standard library is still a library.

You know what I mean ;)
October 01, 2016
On Wednesday, 28 September 2016 at 21:53:52 UTC, Lodovico Giaretta wrote:
> It has already been proposed [1]. I cannot find the discussion thread currently.
>
> [1] https://code.dlang.org/packages/std_data_json

Not the thread, but status:

https://github.com/s-ludwig/std_data_json/issues/24
October 01, 2016
On Friday, 30 September 2016 at 09:41:55 UTC, Chris wrote:
> On Thursday, 29 September 2016 at 21:32:03 UTC, cym13 wrote:
>
>>
>> It's not as if it were the only json library though, asdf for example isn't linked to any web framework https://github.com/tamediadigital/asdf
>
> I like the name `asdf` (it's the same I type when I need random text input). Is there a tutorial / blog / article about it? Maybe it needs more promotion. For the moment it says:
> `
> ! Currently all ASDF Method names and all UDAs are in DRAFT state, we might want want make them simpler. Please submit an Issue if you have input.
> ! ASDF is currently only very loosely validating jsons and with certain functions even silently and on purpose ignoring failing Objects (see below).
> `
>
> So not sure, if it's 100% usable.

its definitly 100% usabe, we use it in production.
and it has a much easier API than all the other libs.
we created it especially for the purpose of easy (and blazing fast!) data extraction from json.
give it a spin and report feedback.
unfortunately i have not had the time yet to write a more detailed blog article.
The reason the warning is there is:
- validation: we usually do not care about a few corrupt records within millions, thus there is this feature  to silently ignore those, i think you still can make these records fail loudly.
- we don't know yet where asdf is bad at, thus we need more feedback
- we are open to change the naming convention of the attributes if someone comes up with good reasoning