You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have an api where we have direct root json objects like below. I have to fetch each object data from the api and push into array and also want to know when all data is completed. Basically its Newline delimited JSON streaming
I am using rsjx with oboe to do that. If i use the below then for each object I am getting done event called it should be printed at the end of 4th json object. How can we achieve this with Oboe, In the given examples there is no example for direct json object all are within some json object array or normal text. Please update
import { Observable } from 'rxjs'
import oboe from 'oboe'
const oboeService = {
streamObservable(input) {
return new Observable(obs => {
const stream = oboe(input)
stream.node('!', data => obs.next(data))
stream.done(() => console.log('donedd')) // To test when done is printed
stream.fail(e => obs.error(e))
})
},
}
export default oboeService
The text was updated successfully, but these errors were encountered:
Hi, I have an api where we have direct root json objects like below. I have to fetch each object data from the api and push into array and also want to know when all data is completed. Basically its Newline delimited JSON streaming
{id : 1, name: 'Test1'}
{id : 2, name: 'Test1'}
{id : 3, name: 'Test1'}
{id : 4, name: 'Test1'}
I am using rsjx with oboe to do that. If i use the below then for each object I am getting done event called it should be printed at the end of 4th json object. How can we achieve this with Oboe, In the given examples there is no example for direct json object all are within some json object array or normal text. Please update
import { Observable } from 'rxjs'
import oboe from 'oboe'
const oboeService = {
streamObservable(input) {
return new Observable(obs => {
const stream = oboe(input)
stream.node('!', data => obs.next(data))
stream.done(() => console.log('donedd')) // To test when done is printed
stream.fail(e => obs.error(e))
})
},
}
export default oboeService
The text was updated successfully, but these errors were encountered: