20 lines of code and 1 class less. J Phil Ritchie Chief Technology Officer Vistatec Vistatec House, 700 South Circular Road, Kilmainham, Dublin 8, Ireland. Tel: +353 1 416 8000 Direct: +353 1 416 8024 Email:
phil.ritchie@vistatec.com www.vistatec.com ISO 9001 ISO 13485 EN 15038 Think Global From: Robert van Engelen [mailto:
engelen@genivia.com] Sent: 01 March 2017 01:49 To: Chase Tingley <
chase@spartansoftwareinc.com> Cc: Phil Ritchie <
phil.ritchie@vistatec.com>;
xliff-omos@lists.oasis-open.org Subject: Re: [xliff-omos] jliff-example1-0.9.3.json Creating an object with a text property is more aesthetic and symmetric indeed. Improves on POLA of the design, which is always a good thing. Dr. Robert van Engelen, CEO/CTO Genivia Inc. voice: (850) 270 6179 ext 104 fax: (850) 270 6179 mobile: (850) 264 2676
engelen@genivia.com On Feb 28, 2017, at 12:13 PM, Chase Tingley <
chase@spartansoftwareinc.com > wrote: A couple years back I was working on a project where we were using an ad-hoc JSON-based serialization to send translation data to a browser, and we actually did something very similar to what Phil is proposing -- wrap text as an object with a dummy type field. The thinking was that it would simplify the implementation. I've never tried it the other way (ie, the way it's currently proposed), so maybe I should do some comparing about whether it makes it a lot harder to work with. On Mon, Feb 27, 2017 at 12:32 PM, Phil Ritchie <
phil.ritchie@vistatec.com > wrote: All Apologies for my various contradictions with myself. I have a bad habit of making statements, walking away from my code and then thinking of a way to move forward. It appears that I can override how my various subclasses write themselves to the serializer. Doing this does let me write out per the example in GitHub. It makes deserialization slightly more work. Phil Phil Ritchie Chief Technology Officer Vistatec Vistatec House, 700 South Circular Road, Kilmainham, Dublin 8, Ireland. Tel: +353 1 416 8000 Direct: +353 1 416 8024 Email:
phil.ritchie@vistatec.com www.vistatec.com ISO 9001 ISO 13485 EN 15038 Think Global From:
xliff-omos@lists.oasis-open.org [mailto:
xliff-omos@lists.oasis-open.org ] On Behalf Of Phil Ritchie Sent: 27 February 2017 15:23 To:
xliff-omos@lists.oasis-open.org Subject: [xliff-omos] jliff-example1-0.9.3.json I’ve played a bit more with my implementation and I’m not sure that jliff-example1-0.9.3.json can be achieved with a strongly typed language. Even with interfaces I cannot do: … “source”: [ { “id”: “c1”, “kind”: “ph” }, “AAA”, { “id”: “c1”, “kind”: “ph” } ] The closest would probably be: “source”: [ { “id”: “c1”, “kind”: “ph” }, { “text”: “AAA” }, { “id”: “c1”, “kind”: “ph” } ] Phil Phil Ritchie Chief Technology Officer Vistatec Vistatec House, 700 South Circular Road, Kilmainham, Dublin 8, Ireland. Tel: +353 1 416 8000 Direct: +353 1 416 8024 Email:
phil.ritchie@vistatec.com www.vistatec.com ISO 9001 ISO 13485 EN 15038 Think Global