gautamdudeja90 / beanio

Automatically exported from code.google.com/p/beanio
Apache License 2.0
0 stars 1 forks source link

Allow for dynamic field/segment occurrences based on another field in the same record #69

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
See summary.

Original issue reported on code.google.com by kevin.s...@gmail.com on 6 Apr 2013 at 6:23

GoogleCodeExporter commented 9 years ago
A new configuration attribute called 'occursRef' may be applied to a field or 
segment that refers to the name of a preceding field that indicates the number 
of occurrences.  For example:

  <stream name="o1" format="csv">
    <record name="record" class="map">
      <field name="occurs" ignore="true" />
      <field name="values" collection="list" occursRef="occurs" />
      <field name="end" literal="end" />
    </record>
  </stream>

Would allow for unmarshaling the following records:

0,end
1,one,end
2,one,two,end
etc...

Original comment by kevin.s...@gmail.com on 8 Apr 2013 at 1:56

GoogleCodeExporter commented 9 years ago
Resolved for 2.1.0.M1.  Snapshot JAR attached.

Original comment by kevin.s...@gmail.com on 8 Apr 2013 at 2:25

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by kevin.s...@gmail.com on 27 Apr 2013 at 11:44