Take the 2-minute tour ×

A client has provided me with some data that's in a tree-like structure. It's just composed of YES/NO questions. The ending results are relatively small strings (less than 100 characters), but some of the ending results end in large strings with formatting included (tabs, line feeds, etc).

There's also more than just one tree-like structure for different systems, so I would need a way to identify them from each other. I'm currently just parsing all this data into one json file, but keeping the formatting for the large results tend to be a bit tedious. The JSONSerialization in iOS 5 is pretty picky when it comes to formatted strings.

Anyway, here's an example:

"Skin Assessment":{
    "ID" : "1",
                 "Have you completed a skin assessment?",
                 "Does your assessment include Colour, Temperature, Texture, & Turgor?",
                 "Were findings within expected range?"
               "NO":"You must complete the skin assessment prior to documenting your findings."
               "NO":"You must complete the skin assessment prior to documenting findings."
               "YES":"Document Colour as: \n\t- Consistent with genetic background\n\t- Pink\n\t- Pale\n\t- mottled\n\t- Cyanotic\n\t- Jaundiced\n\t- Flushed\n\nDocument Temperature/moisture as:\n\t- Warm, dry, intact \n\t- Cool\n\t- Clammy\n\t- Diaphoretic\n\nDocument Texture as:\n\t- Smooth\n\t- Rough \n\t- Dry\n\t- Moist\n\t- Scaly\n\t- Thick or Thin\n\t- Eczema (note colour)\n\t- Lesions (this will require extra documentation such as size, elevation, shape, colour, symmetry) \n\t- Wounds (this will require further documentation such as size, shape, discharge/drainage, dressing)\n\nDocument Turgor as:\n\t- Easily rises\n\t- Immediate return\n\t- Tenting?\n"
share|improve this question
If you're good with a lot of C++, RTrees seem like a great way. –  CodaFi May 15 '12 at 3:19
I have no idea what R-Trees are, is there a specific example/tutorial for iOS that I could take a look at? –  ad0ran May 16 '12 at 4:17
Would Core Data be a viable option for persistence here? You can set up trees and other data structures pretty easily with the right data model design. –  Brad Larson May 16 '12 at 21:00
add comment


Your Answer



Browse other questions tagged or ask your own question.