RE: jliff-example1-0.9.3.json

From
Phil Ritchie <>
Date
2017-02-27T20:32:52+00:00
ID
Thread
RE: jliff-example1-0.9.3.json
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: 

www.vistatec.com | ISO 9001 | ISO 13485 | EN 15038

Think Global

From:  [mailto:]
On Behalf Of Phil Ritchie

Sent: 27 February 2017 15:23

To: 

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: 



www.vistatec.com

 | 

ISO 9001

 | 

ISO 13485

 | 

EN 15038

Think Global