Question: How do I convert the following `String` to a `Person` object ?

String content:
---------------

```
String testString = "John|23;Ron|22;Don|32"

```

Person class:
-------------

```
public class Person{
   private String name;
   private String age;
   //getters and setters for name and age
}

```

Is there any utility class to convert the testString to Person objects based on the delimiters ";" and "|"

Answer: 
It is not in standard format like `json`, so you would need to write your own parser. For example, here is the `Person` class that does what you want:

```
public class Person {
    private final String name;
    private final int age;

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public static Collection<Person> parse(String input) {
        Collection<Person> persons = new HashSet<Person>();
        for (String s : input.split(";")) {
            String[] properties = s.split("\\|");
            persons.add(new Person(properties[0], Integer.parseInt(properties[1])));
        }
        return persons;
    }

    public static void main(String[] args) {
        String testString = "John|23;Ron|22;Don|32";
        System.out.println(parse(testString));

    }

}

```

If it was in `json` you could use a `json` parser.
Not easily; that's not really a standard format. My advice would be to write a `static fromString` method on `Person`, and then call `Person.fromString()` on each item returned by `testString.split(";")`.