Skip to content

11 comments

After dealing with some nasty associative arrays built from XML, I decided enough was enough!

Documentation still needs some work, and I would like to introduce JSONpath eventually so we can also handle JSON!

9 points

This is nice, i've been looking for something just like this. Thank!

6 points

That’s a cool way of handling this problem but not very useful in my case as the XML documents I work with are not a standard structure that you know about ahead of time. Is there any plans to add in wildcard support for variable sections of a document?

Example #[STR(‘/first/second/*/fourth’)]

3 points

Interesting problem, technically it can handle that I think! Under the hood it just uses xpath queries (I need to make this more obvious in the docs!) So you could just have a path of '//fourth'

5 points

That's what I came to ask. Really nice that it uses xpath.

2 points

Do we have any benchmarks for this vs manual assignment after decoding in case of memory and time?

3 points

Currently, no, although I'm very much aware this can be an issue.

I'll look at benchmarking it and publishing the results, hopefully sometime this week.

2 points

It would be cool if you could just slap one attribute on the top-level class and have it be able to automatically infer the fields where the name matches

3 points

That's not a bad idea. Wouldn't be able to get values from attributes, but could definitely use it to fill out properties by node values!

I'll knock together a draft to see what it would look like!

1 points
unknown author

Deleted before we saved it.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.