From: Eduard D. <ed...@fr...> - 2021-01-05 10:38:08
|
Yes, something like: "text":{"match":"De","#text":[" volgende ","match":"dag"," zat Esther in ","match":"de"," bibliotheek achter een stapel boeken over psychiatrie en psychopathologie.\n "]} or (using badgerfish xslt): "text":[{"match":{"$":"De"}},{"$":" volgende "},{"match":{"$":"dag"}},{"$":" zat Esther in "},{"match":{"$":"de"}},{"$":" bibliotheek achter een stapel boeken over psychiatrie en psychopathologie.\n "}] Important thing is the matches at the correct position. Bye, Eduard -----Original Message----- From: Jean-Paul Rehr <re...@gm...<mailto:Jean-Paul%20Rehr%20%3cr...@gm...%3e>> To: Eduard Drenth <ed...@fr...<mailto:Eduard%20Drenth%20%3ce...@fr...%3e>> Cc: Exi...@li... <Exi...@li...<mailto:%22E...@li...%22%20%3cE...@li...%3e>> Subject: Re: [Exist-open] json serialization Date: Tue, 05 Jan 2021 10:39:44 +0100 Dear Eduard, can you provide an example of what you wish the json output to look like? Best for the new year, JPR On Tue, Jan 5, 2021 at 10:17 AM Eduard Drenth <ed...@fr...<mailto:ed...@fr...>> wrote: Dear all, This xml snippet: <text> <match>De</match> volgende <match>dag</match> zat Esther in <match>de</match> bibliotheek achter een stapel boeken over psychiatrie en psychopathologie. </text> Is turned into the below json when using fn:serialize: [cid:c31...@fr...] As you can see, the match children are serialized first, which makes it impossible to get the matching right. The order of this serialization seems wrong, can this be configured / fixed? Regards, Eduard -- Eduard Drenth, Software Architekt ed...@fr...<mailto:ed...@fr...> Doelestrjitte 8 8911 DX Ljouwert +31 58 234 30 47 +31 62 094 34 28 (privé) skype: eduarddrenth https://github.com/eduarddrenth frisian.eu<http://frisian.eu> gpg: https://pgp.surfnet.nl/pks/lookup?search=eduarddrenth Op freed bin ik thús/wurkje ik minder _______________________________________________ Exist-open mailing list Exi...@li...<mailto:Exi...@li...> https://lists.sourceforge.net/lists/listinfo/exist-open -- Eduard Drenth, Software Architekt ed...@fr...<mailto:ed...@fr...> Doelestrjitte 8 8911 DX Ljouwert +31 58 234 30 47 +31 62 094 34 28 (privé) skype: eduarddrenth https://github.com/eduarddrenth frisian.eu gpg: https://pgp.surfnet.nl/pks/lookup?search=eduarddrenth Op freed bin ik thús/wurkje ik minder |