I'm trying to use datamapper for something a bit more advanced than I've
done before, and I'm not sure if it's possible or not so I thought I'd ask
about it. Here is the JSON input:
{ "alias": "GlitchTip", "text": "GlitchTip Alert", "attachments": [ {
"title": "Some Cool Error", "title_link":
"https://example.com/some-cool-link", "text": "/inbound/calls" } ] }
And I want to map it to an Atom structure like this:
<entry>
<title>Some Cool Error</title>
<content type="text">/inbound/calls</content>
<link rel="alternate" type="text/html"
href="https://example.com/some-cool-link" />
</entry>
The basic issue I'm running into is that because attachments is an array,
datamapper wants to wrap each element of the array in a tag. I'd like
everything from every element of the array (of which there happens to only
ever be one) to go onto the parent <entry> tag. I've looked at the code a
bit and I think this might just not be something the datamapper format can
describe, but thought I'd ask here if I maybe missed something.
Thanks.
--
You received this message because you are subscribed to the Google Groups
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prosody-dev/52c552ce-7495-4667-a6d6-414625c1b246n%40googlegroups.com.