basti123: Perl-Hash nach JSON

Beitrag lesen

Ok, vielen Dank euch allen. Schaue ich mir an.

Was ich brauche, ist eigentlich diese XML-Struktur in JSON, weil das dann für eine Android-Programmierung gebraucht wird:

  
<books>  
<book id="1">  
   <author>author1</author>  
   <title>title1</title>  
 </book>  
 <book id="2">  
   <author>author2</author>  
   <title>title2</title>  
 </book>  
</books>  
...  

In der Daetenbank ist es einfach zeilenweise abgelegt:
1 | author1 | title1
2 | author2 | title2
...

und ich denke mir, dass dies dann in JSON so aussehen müsse:

id: 1
 author: "author1"
 title: "title1",
id:2
 author: "author2"
 title: "title2",
...

Grüße,
Basti