private FloatArrayFS deserializeFloatArray()

in src/main/java/org/apache/uima/json/jsoncas2/ser/FeatureStructureDeserializer.java [412:426]


  private FloatArrayFS deserializeFloatArray(JsonParser aParser, CAS aCas) throws IOException {
    // Skip array opening and go to first value (or end of array if there is no value)
    aParser.nextValue();
    aParser.nextValue();
    List<Float> values = new ArrayList<>();
    while (aParser.currentToken() != JsonToken.END_ARRAY) {
      values.add((float) readDoubleValue(aParser));
      aParser.nextValue();
    }
    FloatArrayFS arrayFs = aCas.createFloatArrayFS(values.size());
    for (int i = 0; i < values.size(); i++) {
      arrayFs.set(i, values.get(i));
    }
    return arrayFs;
  }