Skip to content

Saving using the kiota-abstractions-go/serialization Package #141

Answered by baywet
dadams39 asked this question in Q&A
Discussion options

You must be logged in to vote
target := "My Message"
// Iterate over all pages (e.g. Messages)
iterateErr := pageIterator.Iterate(func(pageItem interface{}) bool {
    message := pageItem.(models.Messageable)
    fmt.Printf("%s\n", *message.GetSubject())
    if target == *message.GetSubject() {
        writer, err := requestAdapter.GetSerializationWriterFactory().GetSerializationWriter("application/json")
        err := writer.WriteObjectValue("", message)
        serializedValue, err := writer.GetSerializedContent()
        // do something with the serialized value like persist it or send to another process etc...
        parseNode, err := absser.DefaultParseNodeFactoryInstance.GetRootParseNode("application/json", se…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
3 replies
@baywet
Comment options

@dadams39
Comment options

@baywet
Comment options

Comment options

You must be logged in to vote
4 replies
@dadams39
Comment options

@baywet
Comment options

@dadams39
Comment options

@baywet
Comment options

Answer selected by dadams39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants